Nginx+daemontools

Grzegorz Nosek grzegorz.nosek at gmail.com
Thu Jan 31 11:09:15 MSK 2008


On Wed, Jan 30, 2008 at 06:20:08PM -0800, mobiledreamers at gmail.com wrote:
> it is not working with spawn-fcgi
> since spawnfcgi spawns a child
> and exits
> so supervise keeps trying to spawn childs
> continuously
> 
> service/run
> #!/bin/sh
> cd /home/mark/work/code
> 
> exec /opt/local/bin/spawn-fcgi   -f /home/mark/work/code/code.py -p 9500  >
> /tmp/restart.log 2>&1 &
> exec cat /tmp/restart.log &
> exec /opt/local/bin/spawn-fcgi   -f /home/mark/work/code/code.py -p 9501  >
> /tmp/restart.log 2>&1 &
> exec cat /tmp/restart.log &
> 
> exec /opt/local/bin/spawn-fcgi  -f /home/mark/work/code/code.py -p 9502  >
> /tmp/restart.log 2>&1 &
> exec cat /tmp/restart.log &
> 
> exec /opt/local/bin/spawn-fcgi -f /home/mark/work/code/code.py -p 9503 >
> /tmp/restart.log 2>&1 ^
> exec cat /tmp/restart.log &

Try removing those cats (leaving only the spawn-fcgi lines) and adding:

wait

to the very end of the script (not tested).

Best regards,
 Grzegorz Nosek





More information about the nginx mailing list