Running nginx with daemontools
Hey guys I m trying to figure out how to run nginx and the backends
using
supervise in daemon mode
the idea is to run the fastcgi backends in supervise daemonzied mode so
that
if they get killed due to memory leaks or overload or whatever error
they
can be rebooted by supevise automatically wtihout human intervention
thanks for sharing ideas
Syntax:daemon on | off
Default:on
daemon off;
Do not use the “daemon” and “master_process” directives in a production
mode, these options are mainly used for development only. You can use
daemon off safely in production mode with runit / daemontools
however
you can’t do a graceful upgrade. master_process off should never be
used
in production.
Running nginx with daemontools
Hey guys I m trying to figure out how to run nginx and the backends
using supervise in daemon mode
the idea is to run the fastcgi backends in supervise daemonzied mode
so that if they get killed due to memory leaks or overload or whatever
error they can be rebooted by supevise automatically wtihout human
intervention
thanks for sharing ideas
I think the best idea is to not run Nginx under daemontools. But by
all means run your FCGI processes under it since Nginx won’t
automatically restart them if they die.
I’m using nginx as a reverse proxy and so I’ve got several sites which
use exactly the same config with the exception of the port. Is there
a way to do something like…
array {10,20,99}
for each i in array {
server {
listen $i;
…
}
}
Perhaps an odd question, but nginx has all kinds of useful features
I’d never thought of before.
Please share spawn fcgi run file for multiple python backends
it is not working with spawn-fcgi
since spawnfcgi spawns a child
and exits
so supervise keeps trying to spawn childs
continuously
Is the “spawn-fcgi” the one that is built with Lighttpd? If so, add
the “-n” flag so that it won’t fork to the background. I “spawn-fcgi”
to handle PHP built as a FastCGI application.