##// END OF EJS Templates
gunicorn: updated gunicorn config based on release changes
marcink -
r808:418e3613 default
parent child Browse files
Show More
@@ -1,16 +1,6 b''
1 1 """
2 gunicorn config extension and hooks. Sets additional configuration that is
3 available post the .ini config.
4
5 - workers = ${cpu_number}
6 - threads = 1
7 - proc_name = ${gunicorn_proc_name}
8 - worker_class = sync
9 - worker_connections = 10
10 - max_requests = 1000
11 - max_requests_jitter = 30
12 - timeout = 21600
13
2 Gunicorn config extension and hooks. This config file adds some extra settings and memory management.
3 Gunicorn configuration should be managed by .ini files entries of RhodeCode or VCSServer
14 4 """
15 5
16 6 import gc
@@ -247,9 +237,11 b' def pre_request(worker, req):'
247 237
248 238 def post_request(worker, req, environ, resp):
249 239 total_time = time.time() - worker.start_time
240 # Gunicorn sometimes has problems with reading the status_code
241 status_code = getattr(resp, 'status_code', '')
250 242 worker.log.debug(
251 243 "GNCRN POST WORKER [cnt:%s]: %s %s resp: %s, Load Time: %.4fs",
252 worker.nr, req.method, req.path, resp.status_code, total_time)
244 worker.nr, req.method, req.path, status_code, total_time)
253 245 _check_memory_usage(worker)
254 246
255 247
General Comments 0
You need to be logged in to leave comments. Login now