As is usually the case with any database I want to run rqlite as a service. I am using my trusty tool for this, NSSM. It starts up just fine but when I go to stop it just hangs in stopping. I end up having to kill the PID to get it to truly shutdown.
Does anyone have experience running rqlite as a service in windows? Below are my settings with NSSM. Even if you don't know the product you can probably take some good guesses at what each does. I've experimented with a few different combinations of arguments. I've also played around with the logging settings to see if by chance that might be hanging it up.
Here are the log messages I get
[rqlited] 2023/05/22 11:42:56 received signal "interrupt", shutting down
[http] 2023/05/22 11:42:56 HTTP service stopped: http: Server closed
[rqlited] 2023/05/22 11:42:56 stepping down as Leader before shutdown
[rqlited] 2023/05/22 11:42:56 rqlite server stopped
And the NSSM settings
install rqlited rqlited.exe
set rqlited AppParameters "-node-id 1 -on-disk -on-disk-path C:\build\data\rqlite\mon.db -fk -raft-remove-shutdown node1"
set rqlited AppDirectory C:\Windows
set rqlited AppExit Default Restart
set rqlited AppNoConsole 1
set rqlited AppStdout C:\build\logs\rqlited.log
set rqlited AppStdoutCreationDisposition 2
set rqlited AppStderr C:\build\logs\rqlited.log
set rqlited AppStderrCreationDisposition 2
set rqlited AppKillProcessTree 0
set rqlited AppRotateFiles 1
set rqlited AppRotateOnline 1
set rqlited AppRotateBytes 10000
set rqlited DisplayName rqlited
set rqlited ObjectName LocalSystem
set rqlited Start SERVICE_AUTO_START
set rqlited Type SERVICE_WIN32_OWN_PROCESS