In the case that your server crashes, stop all other instances of the game and locate PORTS.txt in "/server/PORTS.txt", and set it to zero. Then go to the GitHub repository and submit a bug report with a screenshot of the console if applicable.
If you can't connect to the server, verify that:
There is nothing we can do about this. It could be your connection speed or a slow server unable to run the game at full speed. Press "backslash" ("\") ingame and in the top-right corner it should list TPS and Ping. If your Ping is high then that is likely the source of your lag. If you TPS is low then the server is lagging. Check that there is nothing eating your computer's resources by opening Task Manager (Windows) by pressing Ctrl+Shift+Esc.