What is the right way to stop Alkaline?

Alkaline can be stopped and restarted almost at any time.

Using the console shutdown (available since 1.4) is the only right way of stopping the daemon on both UNIX and Windows NT systems. You will find an AlkalineStop.pl Perl script to execute this shutdown from command line in the AlkalineTools. You can also implement your own code with a different scripting language, the shutdown operation consists of posting a form with ACTION=shutdown to the /admin/ url of a running Alkaline with Basic auth credentials.

To stop a listening server, try perl AlkalineStop.pl server:port user password . The user and the password are usually root with the password defined in the global.cnf file.

Ctrl-C and kill -SIGTERM is acceptable when stopping Alkaline as it is indexing from command line. You should be using kill -9 to stop Alkaline only if you know it is not writing an index (when running with --noreindex , etc).

If you Ctrl-C or kill -SIGTERM a running Alkaline process, the signal will be ignored when Alkaline is writing indexes. It you kill -9 a running Alkaline while it is writing indexes, this may corrupt them.

To kill Alkaline, you can try ps -e | grep asearch | cut -b-6 | xargs -l kill -9 on Sun or ps ex | grep asearch | cut -b-6 | xargs -l kill -9 on Linux. Look at the manual pages of ps for your OS-specific options.

When running Alkaline as a Windows NT service, use the stop service menu item from the services control panel. You can also kill the asearch.exe process from the Task Manager. There are also a kill and a tlist (processes list) tools widely available in the SDK or built in Windows NT.