Post 28 Oct 2012, 12:54 by Lewin
Now that you mentioned it, I remember that at least on one occasion everyone reconnected at the same time during the game, if the server really crashed periodically then that might be it.
Probably it would be a good idea to add some cleanup code in the exception handler to properly close all open sockets and/or wait some time before restarting the server.
It does properly clean up the sockets to the best of my knowledge, but Linux seems to hold it open for a while. Even if I start the server then kill it with CTRL+C the socket is kept open for a minute or so by Linux (doesn't happen on Windows). I've tried different ways of closing the sockets but it still seems to keep them open sometimes. It currently waits 5 seconds between retrying to start the server. In the log files you attached there were a few times where it crashed then tried to restart for 30 seconds or so until the old socket went away (even though it should have closed it...). But most times that I checked in the log it managed to restart, except the last time where it seemed to be having some other problem, possibly with the log file timestamps overflowing 2^32 which meant it couldn't do anything.