django生产环境启动问题

unavailable modifier requested: 0

环境: nginx+uwsgi+django

*** Starting uWSGI 2.0.16 (64bit) on [Wed Jun 20 13:46:49 2018] ***
compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-18) on 13 February 2018 18:24:33
os: Linux-2.6.32-642.15.1.el6.x86_64 #1 SMP Fri Feb 24 14:31:22 UTC 2017
nodename: prism-monitor-online001-jylt.qiyi.virtual
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /data/app/hcdnstatistics
writing pidfile to /data/app/hcdnstatistics/run/uwsgi.pid
detected binary path: /usr/sbin/uwsgi
dropping root privileges as early as possible
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
chdir() to /data/app/hcdnstatistics/
your processes number limit is 128326
your memory page size is 4096 bytes
 *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** 
detected max file descriptor number: 1024
building mime-types dictionary from file /etc/mime.types...883 entry found
lock engine: pthread robust mutexes
thunder lock: enabled
uwsgi socket 0 bound to UNIX address /data/app/hcdnstatistics/run/uwsgi.sock fd 6
dropping root privileges after socket binding
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
dropping root privileges after plugin initialization
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
your server socket listen backlog is limited to 300 connections
your mercy for graceful operations on workers is 60 seconds
mapped 2284103 bytes (2230 KB) for 16 cores
*** Operational MODE: preforking ***
*** no app loaded. going in full dynamic mode ***
dropping root privileges after application loading
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 979)
spawned uWSGI worker 1 (pid: 980, cores: 1)
spawned uWSGI worker 2 (pid: 981, cores: 1)
spawned uWSGI worker 3 (pid: 982, cores: 1)
spawned uWSGI worker 4 (pid: 983, cores: 1)
spawned uWSGI worker 5 (pid: 984, cores: 1)
spawned uWSGI worker 6 (pid: 985, cores: 1)
spawned uWSGI worker 7 (pid: 986, cores: 1)
-- unavailable modifier requested: 0 --
-- unavailable modifier requested: 0 --
-- unavailable modifier requested: 0 --
-- unavailable modifier requested: 0 --
-- unavailable modifier requested: 0 --
-- unavailable modifier requested: 0 --
-- unavailable modifier requested: 0 --

  

原因

uwsgi 启动时,找不到正确的python引起。

原来是机器上原来有一个默认的uwsgi 

root@standby.me [14:10:38]$ uwsgi --version 
2.0.16
root@standby.me [14:10:45]$ which uwsgi 
/usr/sbin/uwsgi
root@standby.me [14:10:49]$
root@standby.me [14:10:34]$ /usr/local/python2.7/bin/uwsgi --version 
2.0.17
root@standby.me [14:10:45]$ 

 

原来启动是:

killall -9 uwsgi && uwsgi --ini /data/app/hcdnstatistics/run/uwsgi.ini

改为正确的uwsgi即可

/usr/local/python2.7/bin/uwsgi --ini /data/app/hcdnstatistics/run/uwsgi.ini

  

 

参考:Django uwsgi 启动问题

 

转载于:https://www.cnblogs.com/standby/p/9203558.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值