- Running as Windows Service
- MANAGER SIGNALS
- MANAGER COMMANDS
- SEE ALSO
Mojo::Server::Elzar - A windows multithreaded production web server
use Mojo::Server::Elzar; my $elzar = Mojo::Server::Elzar->new; $elzar->run('/home/me/myapp.pl');
Mojo::Server::Elzar is a multithreaded alternative for Mojo::Server::Hypnotoad which is not available under Win32. It is designed to work as far as possible like Mojo::Server::Hypnotoad and will even use existing hypnotoad configuration entries.
The differences will be listed in this document.
> elzar ./myapp.pl
You can run the same command again for automatic hot deployment.
> elzar ./myapp.pl Starting hot deployment for Elzar server 31841.
This second invocation will load the application again, detect the process id file with it, and send a "DEPLOY" command to the already running server.
See "DEPLOYMENT" in Mojolicious::Guides::Cookbook for more.
You can install elzar as Windows service. This has an additional dependency on the module Win32::Daemon. To install use:
> elzar -i MyService ./myapp.pl
This will install a manually startable service under the local system account. The user should of course be changed to a lesser privileged account.
Hot deploy can be triggered as usual by doing:
> elzar ./myapp.pl
or by pausing the service via Service Control (Computer Management). Pausing the service will only start the hot deploy but will not pause processing. Service Control will state that it couldn't pause the service.
The Mojo::Server::Elzar manager process can be controlled at runtime with the following signals.
Shut down server immediately.
Shut down server gracefully.
$ elzar ./myapp.pl -c "WORKERS -2" Sent command 'WORKERS -2'!
Mojo::Server::Elzar is new and should not be considered ready for production yet. Please report any issues on github https://github.com/tomk3003/mojo-server-threaded/issues