大家看看这个 django+nginx 里配置的 uwsgi.ini 有什么问题吗? 为什么一启动 uwsgi 就无法用 reboot 重启服务器了。一直卡死 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
python30
V2EX    Python

大家看看这个 django+nginx 里配置的 uwsgi.ini 有什么问题吗? 为什么一启动 uwsgi 就无法用 reboot 重启服务器了。一直卡死

  •  
  •   python30 2020-02-19 12:46:05 +08:00 2652 次点击
    这是一个创建于 2060 天前的主题,其中的信息可能已经有所发展或是发生改变。
    centos7.4 7.6 都一样
    现在用的 centos7.6
    python3.6
    django2.2
    只要一启动 uwsgi.ini 就无法在 centos 里用 reboot 重启了

    得需要在控制面版里重启才可以。

    应该是 uwsgi 配置的不对。

    请大家帮我看看。谢稿。

    xxx_uwsgi.ini

    # myweb_uwsgi.ini file
    [uwsgi]

    #django-related settings
    socket = 127.0.0.1:8008
    # the base directory (full path)
    chdir = /var/wwwroot/html/aabbcc

    # Django s wsgi file
    module = aabbcc.wsgi:application

    env = DJANGO_SETTINGS_MODULE = aabbcc.settings
    daemOnize= /var/log/nginx/aabbcc_access.log;
    # process-related settings
    # master
    master = true
    py-autoreload = 1

    # maximum number of worker processes
    processes = 4

    # ... with appropriate permissions - may be needed
    # chmod-socket = 664
    # clear environment on exit
    vacuum = true



    /etc/rc.d/rc.local 里面:

    #!/bin/bash
    # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
    #
    # It is highly advisable to create own systemd services or udev rules
    # to run scripts during boot instead of using this file.
    #
    # In contrast to previous versions due to parallel execution during boot
    # this script will NOT be run after all other services.
    #
    # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
    # that this script will be executed during boot.

    touch /var/lock/subsys/local
    cd /var/wwwroot/html/aabbcc && /usr/local/bin/uwsgi --ini aabbcc_uwsgi.ini
    5 条回复    2020-07-11 17:31:50 +08:00
    hushao
        1
    hushao  
       2020-02-19 16:56:41 +08:00 via iPhone
    确认是 uwsgi ?
    python30
        2
    python30  
    OP
       2020-02-19 17:36:31 +08:00
    @hushao 应该是。只要停止 uwsgi 就能正常重启
    python30
        3
    python30  
    OP
       2020-02-19 18:32:44 +08:00
    @hushao
    发现了个问题
    我是 centos7.6 系统

    如果不用 /etc/rc.d/rc.local 在这里面启动设置开机自启动 uwsgi
    开机进去手动启动 uwsgi 就可以正常重启

    但是这样以后重启还要再进服务器手动启动 uwsgi 很麻烦
    python30
        4
    python30  
    OP
       2020-02-19 19:16:45 +08:00
    @python30 自问自答吧。
    发现问题就好解决了
    不用 /etc/rc.d/rc.local 自启动
    用 systemd supervisor 管理 uwsgi 就可以了

    至少为什么用 /etc/rc.d/rc.local 不可以了。。。我也很奇怪
    kbshr123
        5
    kbshr123  
       2020-07-11 17:31:50 +08:00
    一样的问题。开始没找定位,还重装了
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     906 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 28ms UTC 21:58 PVG 05:58 LAX 14:58 JFK 17:58
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86