UWSGI config

uwsgi options: https://uwsgi-docs.readthedocs.io/en/latest/Options.html

socket = 127.0.0.1:8071
master = true
processes = 4
; API 超时时间
harakiri = 60
harakiri-verbose = true
limit-post = 65536
post-buffering = 8192
;disable request log 
disable-logging = true
;logto = /opt/log/uwsgi-icom.log
logger = file:logfile=/opt/log/uwsgi-icom.log,maxsize=209715200
; only request log
;req-logger = file:logfile=/opt/log/uwsgi-icom-req.log,maxsize=209715200
pidfile = /opt/log/uwsgi-icom.pid
py-tracebacker = /opt/log/traceback/uwsgi-icom-traceback.sock
listen = 127
max-requests = 1000
reload-on-rss = 96
no-orphans = true
log-slow = 3000
enable-threads = true
paste-logger = %p
buffer-size = 32768
; 监控uwsgi
stats = 0.0.0.0:9191
stats-http = true
;stats-minified = true
;stats-no-cores = true
;stats-no-metrics = true
;plugins = /usr/lib64/uwsgi/stats_pusher_file_plugin.so
;stats-push = file:path=/opt/log/uwsgi-icom-stats,freq=10



issue

  1. stats: 监控uwsgi的状态
    document: https://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html
    command:uwsgi --connect-and-read 127.0.0.1:9191
    如果stats-http是true, 可以用http的方式获取uwsgi的信息: curl  127.0.0.1:9191
  2. stats-push: 收集uwsgi的监控数据
    如果uwsgi启动失败, unable to find "file" stats_pusher
    需要手动安装插件,   yum -y install uwsgi-stats-pusher-file
    安装的插件在 /usr/lib64/uwsgi下面,同时把插件路径配置到plugins。

你可能感兴趣的:(web部署)