ini uwsgi.ini与systemd(或主管)合作
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini uwsgi.ini与systemd(或主管)合作相关的知识,希望对你有一定的参考价值。
[uwsgi]
#http=:3036
env=MODE=production
socket=:3030
stats=:5050
gid=webapps
uid=webapps
chdir=<project-path>
venv=/home/webapps/PyEnvs/<project-name>
wsgi-file=<project-name>/wsgi.py
# OR:
# module=<project-name>.wsgi:application
die-on-term=True
master=True
processes=10
max-requests=5000
# harakiri=20
# vacuum=True
# Custom request loglines(extended from Apache-style combined request logging)
log-format=[worker: %(wid)/%(pid)] %(addr) - %(user) [%(ltime)] "%(method) %(uri) %(proto)" %(status) %(size) %(msecs) "%(referer)" "%(uagent)"
touch-reload=/home/webapps/<project-name>/<project-name>/wsgi.py
[uwsgi]
set-placeholder = project-name=<project-name>
set-placeholder = app-root=/home/%U/<project-name>/server
; set-placeholder = app-root=%v
env=APP_ENV=prod
socket=:3030
stats=:5050
stats-http=True ; easily work with uwsgitop
pcre-jit=True
chdir=%(app-root)
virtualenv=/home/%U/PyEnvs/%(project-name)
wsgi-file=%(project-name)/wsgi.py
die-on-term=True
master=True
processes=10
max-requests=200
harakiri=60 ; respawn processes taking too much time
vacuum=True ; clear environment on exit
memory-report=True
reload-on-rss=500 ; reload if rss memory is higher than specified megabytes
touch-reload=%(app-root)/%(project-name)/wsgi.py
以上是关于ini uwsgi.ini与systemd(或主管)合作的主要内容,如果未能解决你的问题,请参考以下文章
nginx中的uwsgi .ini param等价物(烧瓶app上有500个错误)
我已经配置了我的 uwsgi.ini 文件,并且它与 nohup 一起工作正常。如何在启动时自动启动 uwsgi?
centos6.8 搭建nginx+uwsgi+Flask
Ubuntu18部署uwsgi+flask应用
Centos7部署Django项目
Nginx与uWSGI交互