Skip to content

Commit 6c61683

Browse files
author
zhangjie
committed
add gun.py
1 parent 4d022b5 commit 6c61683

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

gun.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import os
2+
import gevent.monkey
3+
gevent.monkey.patch_all()
4+
5+
import multiprocessing
6+
7+
debug = True
8+
loglevel = 'debug'
9+
bind = '0.0.0.0:5000'
10+
pidfile = './gunicorn.pid'
11+
logfile = './debug/debug.log'
12+
13+
#启动的进程数
14+
workers = multiprocessing.cpu_count() * 2 + 1
15+
worker_class = 'gunicorn.workers.ggevent.GeventWorker'
16+
17+
x_forwarded_for_header = 'X-FORWARDED-FOR'

0 commit comments

Comments
 (0)