From 90c1c3d2eddce265922d5db31e7e55cc226b5f7b Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Thu, 1 May 2025 13:10:49 -0500 Subject: [PATCH] uwsgi config tuning. --- docker/uwsgi.ini | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docker/uwsgi.ini b/docker/uwsgi.ini index 326f4b5d..726730bf 100644 --- a/docker/uwsgi.ini +++ b/docker/uwsgi.ini @@ -24,11 +24,8 @@ vacuum = true die-on-term = true static-map = /static=/app/static -# Worker management (Optimize for I/O bound tasks) +# Worker management workers = 4 -threads = 4 -enable-threads = true -thread-stacksize=512 # Optimize for streaming http = 0.0.0.0:5656 @@ -39,8 +36,9 @@ http-timeout = 600 # Prevent disconnects from long streams lazy-apps = true # Improve memory efficiency # Async mode (use gevent for high concurrency) -gevent = 100 -async = 100 +gevent = 400 # Each unused greenlet costs ~2-4KB of memory +# Higher values have minimal performance impact when idle, but provide capacity for traffic spikes +# If memory usage becomes an issue, reduce this value # Performance tuning thunder-lock = true