-
Notifications
You must be signed in to change notification settings - Fork 1
StoppingServer
To stop the server, you can of course just kill the server process but there is a good chance that you will lose some unsaved data because the data blocks are saved to the disk drive with a delay. Proper server stopping requires connecting to cache server and sending the message with server.stop
type. There is a script provided in the "tools/serverStop/" folder that uses a scriptTest tool to send a message to stop the server.
Upon receiving the message, the cache server sends notifications to all slave servers that they need in order to stop, and waits until there are no slave servers connected to it. Each of the slave servers kicks its clients, flushes all data blocks to cache server, logs out of the cache server and exits (in normal mode), or stops handling new client connections (in uniserver mode). After all slave servers disconnect from the cache server, the cache writer thread writes all blocks to the database that require saving. After that, the cache server exits.