##// END OF EJS Templates
gunicorn: updated with expanded gunicorn_conf.py
marcink -
r2451:b2d6dad7 default
parent child Browse files
Show More
@@ -28,9 +28,30 b" accesslog = '-'"
28 28 loglevel = 'debug'
29 29
30 30 # SECURITY
31
32 # The maximum size of HTTP request line in bytes.
31 33 limit_request_line = 4094
32 limit_request_fields = 100
33 limit_request_field_size = 8190
34
35 # Limit the number of HTTP headers fields in a request.
36 limit_request_fields = 1024
37
38 # Limit the allowed size of an HTTP request header field.
39 # Value is a positive number or 0.
40 # Setting it to 0 will allow unlimited header field sizes.
41 limit_request_field_size = 0
42
43
44 # Timeout for graceful workers restart.
45 # After receiving a restart signal, workers have this much time to finish
46 # serving requests. Workers still alive after the timeout (starting from the
47 # receipt of the restart signal) are force killed.
48 graceful_timeout = 30
49
50
51 # The number of seconds to wait for requests on a Keep-Alive connection.
52 # Generally set in the 1-5 seconds range.
53 keepalive = 2
54
34 55
35 56 # SERVER MECHANICS
36 57 # None == system temp dir
@@ -57,10 +78,18 b' def pre_exec(server):'
57 78 server.log.info("Forked child, re-executing.")
58 79
59 80
81 def on_starting(server):
82 server.log.info("Server is starting.")
83
84
60 85 def when_ready(server):
61 86 server.log.info("Server is ready. Spawning workers")
62 87
63 88
89 def on_reload(server):
90 pass
91
92
64 93 def worker_int(worker):
65 94 worker.log.info("[<%-10s>] worker received INT or QUIT signal", worker.pid)
66 95
@@ -81,6 +110,14 b' def worker_abort(worker):'
81 110 worker.log.info("[<%-10s>] worker received SIGABRT signal", worker.pid)
82 111
83 112
113 def worker_exit(server, worker):
114 worker.log.info("[<%-10s>] worker exit", worker.pid)
115
116
117 def child_exit(server, worker):
118 worker.log.info("[<%-10s>] worker child exit", worker.pid)
119
120
84 121 def pre_request(worker, req):
85 122 return
86 123 worker.log.debug("[<%-10s>] PRE WORKER: %s %s",
@@ -93,6 +130,7 b' def post_request(worker, req, environ, r'
93 130 req.method, req.path, resp.status_code)
94 131
95 132
133
96 134 class RhodeCodeLogger(Logger):
97 135 """
98 136 Custom Logger that allows some customization that gunicorn doesn't allow
General Comments 0
You need to be logged in to leave comments. Login now