1 Star 2 Fork 1

卜星星/rurality

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
gunicorn.py 717 Bytes
一键复制 编辑 原始数据 按行查看 历史
卜星星 提交于 2020-10-20 18:25 . 运行服务
'''
gunicorn -c gunicorn.py rurality.wsgi:application
'''
import os
import multiprocessing
# 设置gunicorn进程名称,ps和top时可以查看
# 需要安装: pip install setproctitle
proc_name = 'rurality'
default_proc_name = 'rurality'
CUR_DIR = os.path.dirname(__file__)
# 开启几个进程
workers = multiprocessing.cpu_count() * 2
# 每个进程开启几个线程
threads = multiprocessing.cpu_count() * 2
# 每个worker最大处理请求数量, 超过就重启此worker
max_requests = 1000
# 随机增加偏移量range(1, max_requests_jitter),与max_requests配合,防止多个worker同时重启
max_requests_jitter = 100
bind = "0.0.0.0:18785"
chdir = CUR_DIR
preload = True
worker_class = 'gevent'
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/bxxfighting/rurality.git
git@gitee.com:bxxfighting/rurality.git
bxxfighting
rurality
rurality
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385