Forum: Managing VoltDB

Post: Shutting down VoltDB server

Shutting down VoltDB server
Clocks
Oct 30, 2012
Is there a way to stop the VoltDB server from the terminal without pressing ctrl-C? I would like to make the server exit normally.
Shutting down volt
awilson
Oct 31, 2012
Hi,
There are a couple of ways to shutdown a voltdb server or cluster without ctrl-c or kill -9. The enterprise edition has a tool called Volt Enterprise Manager that can gracefully close a cluster. You can also do it in a somewhat more manual way depending on whether you want to save the data you've been working with.

The manual method to first start sqlcmd and exec @Shutdown;
This will shutdown the VoltDB node that sqlcmd is connected to at the time.
See http://community.voltdb.com/docs/UsingVoltDB/sysprocshutdown

If you want to save your data then run these two commands:
exec @SnapshotSave ;
exec @Shutdown;

That will save a snapshot and shutdown VoltDB.

Finally, you can connect to the admin port with sqlcmd and run these commands:
exec @Pause;
exec @SnapshotSave
exec @shutdown;

@Pause will pause the db and block new transactions. @SnapshotSave will save the state of the database. @Shutdown will close VoltDB.

Look at http://community.voltdb.com/docs/UsingVoltDB/AppSysProc for sysproc information
Look at http://community.voltdb.com/docs/UsingVoltDB/ChapAppRun and http://community.voltdb.com/docs/UsingVoltDB/ChapSaveRestore for more detailed information on saving and restoring a cluster. These also talk about how to connect to the admin port.