Trying to set up nginx + django and followed the descriptions here: http://forum.webfaction.com/viewtopic.php?id=1981 everything works fine
Everything works fine as long as I run django like this: python2.7 manage.py runfcgi maxchildren=1 maxspare=1 minspare=1 method=prefork socket=$PWD/django.sock pidfile=django.pid daemonize=false
But when I try running it in the background, like this: python2.7 manage.py runfcgi maxchildren=1 maxspare=1 minspare=1 method=prefork socket=$PWD/django.sock pidfile=django.pid daemonize=true > /dev/null 2>&1 & it just quits. Can't see any error messages anywhere, it's not there in the processes, it's definitely not running.
Am I not allowed to do this via ssh? Should it be done somehow from the console?
Any help, suggestion appreciated!
asked 01 Jul '11, 18:37
Try removing the pipe to null,
There is no reason daemonize should not work, It is how apache or gunicorn work. What happens if you open another SSH terminal and swatch your processes in real-time? This can be done with the htop command,
answered 01 Jul '11, 18:48
You could try redirecting the output of that command to some file by running something like:
This should record the entire output, along with any error messages to $HOME/django_fcgi.log. You can check the contents of that file for clues about why "daemonize=true" is crashing.
answered 02 Jul '11, 02:41
Guuuys! Got it working now!! :) It was the "pidfile=django.pid". Need to use an absolute path here as well (Daaaa...) Thanks for your time and the responses!
answered 02 Jul '11, 03:21