Show More
@@ -126,7 +126,7 b' dev-srv:' | |||
|
126 | 126 | .PHONY: dev-srv-g |
|
127 | 127 | ## run gunicorn multi process workers |
|
128 | 128 | dev-srv-g: |
|
129 |
gunicorn |
|
|
129 | gunicorn --paste .dev/dev.ini --bind=0.0.0.0:10020 --config=.dev/gunicorn_config.py | |
|
130 | 130 | |
|
131 | 131 | |
|
132 | 132 | # Default command on calling make |
@@ -116,13 +116,14 b' keepalive = 2' | |||
|
116 | 116 | # graceful restart signal 0 = memory monitoring is disabled |
|
117 | 117 | # Examples: 268435456 (256MB), 536870912 (512MB) |
|
118 | 118 | # 1073741824 (1GB), 2147483648 (2GB), 4294967296 (4GB) |
|
119 | # Dynamic formula 1024 * 1024 * 256 == 256MBs | |
|
119 | 120 | memory_max_usage = 0 |
|
120 | 121 | |
|
121 | 122 | # How often in seconds to check for memory usage for each gunicorn worker |
|
122 | 123 | memory_usage_check_interval = 60 |
|
123 | 124 | |
|
124 | 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 | 127 | # in case we get enough free memory after that, restart will not happen. |
|
127 | 128 | memory_usage_recovery_threshold = 0.8 |
|
128 | 129 | |
@@ -229,6 +230,9 b' def pre_exec(server):' | |||
|
229 | 230 | def on_starting(server): |
|
230 | 231 | server_lbl = '{} {}'.format(server.proc_name, server.address) |
|
231 | 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 | 238 | def when_ready(server): |
@@ -324,7 +328,7 b' def worker_int(worker):' | |||
|
324 | 328 | return id2name.get(t_id, "unknown_thread_id") |
|
325 | 329 | |
|
326 | 330 | code = [] |
|
327 | for thread_id, stack in sys._current_frames().items(): | |
|
331 | for thread_id, stack in sys._current_frames().items(): # noqa | |
|
328 | 332 | code.append( |
|
329 | 333 | "\n# Thread: %s(%d)" % (get_thread_id(thread_id), thread_id)) |
|
330 | 334 | for fname, lineno, name, line in traceback.extract_stack(stack): |
@@ -1,4 +1,3 b'' | |||
|
1 | ||
|
2 | 1 | |
|
3 | 2 | ; ######################################### |
|
4 | 3 | ; RHODECODE COMMUNITY EDITION CONFIGURATION |
@@ -263,10 +262,10 b' file_store.storage_path = %(here)s/data/' | |||
|
263 | 262 | archive_cache.store_dir = %(here)s/data/archive_cache |
|
264 | 263 | |
|
265 | 264 | ; The limit in GB sets how much data we cache before recycling last used, defaults to 10 gb |
|
266 |
archive_cache.cache_size_gb = |
|
|
265 | archive_cache.cache_size_gb = 40 | |
|
267 | 266 | |
|
268 | 267 | ; By default cache uses sharding technique, this specifies how many shards are there |
|
269 |
archive_cache.cache_shards = |
|
|
268 | archive_cache.cache_shards = 4 | |
|
270 | 269 | |
|
271 | 270 | ; ############# |
|
272 | 271 | ; CELERY CONFIG |
General Comments 0
You need to be logged in to leave comments.
Login now