推荐学习书目
› 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
rockyaow
V2EX  ›  Python

django uwsgi nginx 更新代码后不生效

  •  
  •   rockyaow · Apr 10, 2015 · 8834 views
    This topic created in 4196 days ago, the information mentioned may be changed or developed.

    碰上了奇葩的问题

    django uwsgi nginx的结构

    更新代码后,直接用runserver 是最新的代码

    但是重启uwsgi 重启nginx 后 通过nginx访问,代码还是旧版本的

    尝试过各种修改,均无效,除非把django的代码的整个绝对路径换到另一个目录中

    不知道为什么,怀疑是缓存,但又不知道是哪里的缓存。

    7 replies  •  2017-10-17 19:49:06 +08:00
    mornlight
        1
    mornlight  
       Apr 10, 2015
    如果不是重要的线上环境,你先杀掉进程试试:
    killall uwsgi

    然后再重启所有的uwsgi
    rockyaow
        2
    rockyaow  
    OP
       Apr 10, 2015
    试了,无效
    minibear0523
        3
    minibear0523  
       Apr 11, 2015
    试试~gunicorn
    uniquecolesmith
        4
    uniquecolesmith  
       Apr 11, 2015 via Android
    uwsgi不会自动更新,必须重启才行killall uwsgi; uwsgi -x uwsgi.xml
    ericls
        5
    ericls  
       Apr 11, 2015   ❤️ 1
    uniquecolesmith
        6
    uniquecolesmith  
       Apr 11, 2015
    @ericls thanks
    zengcul
        7
    zengcul  
       Oct 17, 2017 via iPhone
    同遇到代码不生效问题 楼主怎么解决的 明天试试挪一下项目目录 感觉是 uwsgi 的缓存
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   807 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:39 · PVG 06:39 · LAX 15:39 · JFK 18:39
    ♥ Do have faith in what you're doing.