Everything goes well days ago. But since today, when I run fastcgi, the process will be killed by system automatically. The worst thing is I don't know why and which process kill the fastcgi process.
Let me give some detail.
开发者_如何学Gowe use nginx to serve static files for another django app which listen to 80 port.(this is for production use)
And we use lighttpd/fastcgi for another two django apps, which listen to 8090 and 8091 respectively.(these are for development test)
the command I run are:
python manage.py runfcgi host=127.0.0.1 port=8090
and
python manage.py runfcgi host=127.0.0.1 port=8091
after I run one of them, I run ps -ef|grep "python" and I can see the process of fastcgi, but seconds later, they are gone.
the output of ps are:
root 2685 1 0 2009 ? 00:00:27 /usr/bin/python -tt /usr/sbin/yum-updatesd
root 2827 1 0 03:49 ? 00:00:00 python manage.py runfcgi host=127.0.0.1 port=8090
root 2828 2827 0 03:49 ? 00:00:00 python manage.py runfcgi host=127.0.0.1 port=8090
and fastcgi is killed and our site is down.
So what should be the problem? How can I figure out?
Thanks.
Check your logfiles!
You can make add outlog and errlog options to the runfcgi command to log stderr and stdout to a file. See python manage.py help runfcgi
.
'lsof -w -n -i tcp:8090' or 'fuser -n tcp 8090' or 'netstat -anp|grep :8090[[:blank:]]' should show you the process ID. If there is no (init)script to use to shut down the offending service (since TCP/8090 means proxy) to kill you can by PID 'kill -9 pidnumber'.
精彩评论