-
Notifications
You must be signed in to change notification settings - Fork 0
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 data blocks are saved to 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 "tools/serverStop/" folder that uses scriptTest tool to send the message to stop the server.
Upon receiving the message the cache server sends notifications to all slave servers that they need 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 cache server and exits (in normal mode) or stops handling new client connections (in uniserver mode). After all slave servers disconnect from cache server, the cache writer thread writes all blocks to database that require saving. After that cache server exits.