Get the App
SLTechnology News&Howtos  ›  Servers  › 

Sample uwsgi configuration (perplexed by log cutting failure)

Shulou Source: shulou.com Published: 2022-06-02 21:05:24 11月14日 Update

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

Tags: Path log configuration reference instance file time data conflict reference recommendation example Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Apple Shulou Information MariaDB vpn