Django Server运行的实例太多了

时间:2015-11-21 12:05:25

标签: python django django-admin

当Django服务器启动时,我只能看到一个Django服务器实例在后台运行。但过了一段时间,我可以看到多个实例正在运行。

输出:

root@GoldenGate:~# ps |grep python 
 1592 root     79636 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
 2749 root     27936 S    python /root/celestial_NAS/manage.py runsslserver --certificate /etc/ssl/certs/server.crt --key /etc/ssl/private/ser
 2750 root     21056 S    python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
 3156 root     60160 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
 3185 root     87764 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
 3193 root     61188 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
 8023 root     42732 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
 8107 root     68360 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
 8145 root     43760 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
 9163 root     82712 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
12351 root     73484 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
13567 root      1304 S    /bin/sh -c python /root/celestial_NAS/changeadminpassword.py
13568 root     16684 R    python /root/celestial_NAS/changeadminpassword.py
13578 root      1304 S    grep python
16450 root     78608 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
19979 root     48884 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
24374 root     56060 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
25372 root     59132 S    /usr/bin/python /root/celestial_NAS/manage.py runserver 0.0.0.0:80
root@GoldenGate:~#

这会影响系统的性能,请你帮我弄清楚多个进程ID的单个runserver(Django服务器)的多个实例启动背后的根本原因。

1 个答案:

答案 0 :(得分:0)

请按照以下说明操作:How to use Django with uWSGI

here是另一个好人。

我相信theWanderer4865已经详细解释了原因(耐心,哇)。