zoukankan      html  css  js  c++  java
  • 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 启动问题

  • 相关阅读:
    HUNAN 11562 The Triangle Division of the Convex Polygon(大卡特兰数)
    HUNAN 11560 Yangyang loves AC(二分+贪心)
    CSU 1425 Prime Summation
    CSU 1424 Qz’s Maximum All One Square
    一个奇怪的语法问题
    CSU 1416 Practical Number
    CSU 1412 Line and Circles
    Android第一篇
    强大到无与伦比的Graphviz
    CSU 1355 地雷清除计划
  • 原文地址:https://www.cnblogs.com/standby/p/9203558.html
Copyright © 2011-2022 走看看