-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgunicorn.conf.py
More file actions
57 lines (47 loc) · 1.05 KB
/
Copy pathgunicorn.conf.py
File metadata and controls
57 lines (47 loc) · 1.05 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""
Gunicorn configuration for production deployment.
"""
import multiprocessing
import os
# Server socket
bind = "0.0.0.0:8000"
backlog = 2048
# Worker processes
workers = int(os.environ.get('WORKERS', multiprocessing.cpu_count() * 2 + 1))
worker_class = "sync"
worker_connections = 1000
max_requests = 1000
max_requests_jitter = 100
preload_app = True
# Timeout settings
timeout = 30
keepalive = 2
graceful_timeout = 30
# 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" %(D)s'
# Process naming
proc_name = "siblore_pos"
# Server mechanics
daemon = False
pidfile = "/tmp/gunicorn.pid"
user = None
group = None
tmp_upload_dir = None
# SSL (if needed)
# keyfile = "/path/to/keyfile"
# certfile = "/path/to/certfile"
# Worker process settings
max_requests = 1000
max_requests_jitter = 50
preload_app = True
worker_tmp_dir = "/dev/shm"
# Monitoring
statsd_host = None
statsd_prefix = ""
# Security
limit_request_line = 4094
limit_request_fields = 100
limit_request_field_size = 8190