-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgunicorn.conf.py
More file actions
40 lines (32 loc) · 785 Bytes
/
gunicorn.conf.py
File metadata and controls
40 lines (32 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
import multiprocessing
# Server socket
bind = f"0.0.0.0:{os.environ.get('PORT', '5000')}"
backlog = 2048
# Worker processes
workers = 1 # Limited for free tier
worker_class = "sync"
worker_connections = 1000
timeout = 120
keepalive = 2
# Restart workers after this many requests, to help control memory usage
max_requests = 1000
max_requests_jitter = 50
# Preload application code before workers are forked
preload_app = True
# Logging
accesslog = "-"
errorlog = "-"
loglevel = "info"
access_log_format = '%%(h)s %%(l)s %%(u)s %%(t)s "%%(r)s" %%(s)s %%(b)s "%%(f)s" "%%(a)s"'
# Process naming
proc_name = "xmrt-ecosystem"
# Server mechanics
daemon = False
pidfile = None
user = None
group = None
tmp_upload_dir = None
# SSL (if needed)
keyfile = None
certfile = None