Sample uwsgi configuration (perplexed by log cutting failure)
Start
/ usr/local/bin/uwsgi-ini uwsgi.ini-pidfile / var/run/uwsgi.pid-log-reopen
Ini configuration instance
[uwsgi] socket = 127.0.0.1:8010module = manage:cmp_apppythonpath = / home/work/cdn/python2.7/lib/python2.7/site-packageschdir = / home/work/project/wsgi-file = manage.pymaster = trueprocesses = 4callable = myappdaemonize = / home/work/project/logs/uwsgi.logdisable-logging = truepidfile = / var/run/uwsgi.pidpy-autoreload = 1max-requests = 5000touch-logreopen = / home/work/project/logs/touchfile
Be careful
Daemonize cannot write the relative path, which conflicts with touch-logreopen (the log is the relative path at startup, and the relative path under chdir after touch reopen). When touch-logreopen needs to start, add-- log-reopen (reload will cause touch-reopen to fail and will not generate new log files)
Reference:
Https://www.jianshu.com/p/679dee0a4193 recommends it.
Https://uwsgi-docs-zh.readthedocs.io/zh_CN/latest/WSGIquickstart.html quickstart