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
作者:Standby — 一生热爱名山大川、草原沙漠,还有我们小郭宝贝!
出处:http://www.cnblogs.com/standby/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
出处:http://www.cnblogs.com/standby/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。