##// END OF EJS Templates
gunicorn: print config on startup
super-admin -
r1150:7050b122 default
parent child Browse files
Show More
@@ -67,7 +67,7 b' dev-srv:'
67 .PHONY: dev-srv-g
67 .PHONY: dev-srv-g
68 ## run gunicorn multi process workers
68 ## run gunicorn multi process workers
69 dev-srv-g:
69 dev-srv-g:
70 gunicorn --workers=4 --paste .dev/dev.ini --bind=0.0.0.0:10010 --worker-class=sync --threads=1 --config=configs/gunicorn_config.py --timeout=120
70 gunicorn --workers=4 --paste .dev/dev.ini --bind=0.0.0.0:10010 --config=.dev/gunicorn_config.py
71
71
72 # Default command on calling make
72 # Default command on calling make
73 .DEFAULT_GOAL := show-help
73 .DEFAULT_GOAL := show-help
@@ -116,13 +116,14 b' keepalive = 2'
116 # graceful restart signal 0 = memory monitoring is disabled
116 # graceful restart signal 0 = memory monitoring is disabled
117 # Examples: 268435456 (256MB), 536870912 (512MB)
117 # Examples: 268435456 (256MB), 536870912 (512MB)
118 # 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB)
118 # 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB)
119 # Dynamic formula 1024 * 1024 * 256 == 256MBs
119 memory_max_usage = 0
120 memory_max_usage = 0
120
121
121 # How often in seconds to check for memory usage for each gunicorn worker
122 # How often in seconds to check for memory usage for each gunicorn worker
122 memory_usage_check_interval = 60
123 memory_usage_check_interval = 60
123
124
124 # Threshold value for which we don't recycle worker if GarbageCollection
125 # Threshold value for which we don't recycle worker if GarbageCollection
125 # frees up enough resources. Before each restart we try to run GC on worker
126 # frees up enough resources. Before each restart, we try to run GC on worker
126 # in case we get enough free memory after that, restart will not happen.
127 # in case we get enough free memory after that, restart will not happen.
127 memory_usage_recovery_threshold = 0.8
128 memory_usage_recovery_threshold = 0.8
128
129
@@ -229,6 +230,9 b' def pre_exec(server):'
229 def on_starting(server):
230 def on_starting(server):
230 server_lbl = '{} {}'.format(server.proc_name, server.address)
231 server_lbl = '{} {}'.format(server.proc_name, server.address)
231 server.log.info("Server %s is starting.", server_lbl)
232 server.log.info("Server %s is starting.", server_lbl)
233 server.log.info('Config:')
234 server.log.info(f"\n{server.cfg}")
235 server.log.info(get_memory_usage_params())
232
236
233
237
234 def when_ready(server):
238 def when_ready(server):
General Comments 0
You need to be logged in to leave comments. Login now