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。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值