开发者

Auto kill fastcgi process when deploying django

开发者 https://www.devze.com 2022-12-16 06:53 出处:网络
Everything goes well days ago. But since today, when I run fastcgi, the process will be killedby system automatically. The worst thing is I don\'t know why and which process kill the fastcgi process.

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.

开发者_如何学Go

we 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'.

0

精彩评论

暂无评论...
验证码 换一张
取 消