From 4796184a67e0eb32e5448c221346956c8b5ba884 Mon Sep 17 00:00:00 2001 From: Jeff Casimir Date: Sun, 1 Feb 2026 13:42:48 -0700 Subject: [PATCH] Fix uWSGI segfaults by disabling threads when using gevent Mixing threading and gevent concurrency models causes uWSGI workers to crash with segmentation faults, particularly on ARM64/Python 3.13. The production uwsgi.ini was already correct (gevent without threads). This fixes the dev and debug configs to match. References: - https://github.com/gevent/gevent/issues/1784 - https://github.com/unbit/uwsgi/issues/2457 Co-Authored-By: Claude Opus 4.5 --- docker/uwsgi.debug.ini | 2 -- docker/uwsgi.dev.ini | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docker/uwsgi.debug.ini b/docker/uwsgi.debug.ini index 69c040f2..d2847335 100644 --- a/docker/uwsgi.debug.ini +++ b/docker/uwsgi.debug.ini @@ -28,8 +28,6 @@ static-map = /static=/app/static # Worker configuration workers = 1 -threads = 8 -enable-threads = true lazy-apps = true # HTTP server diff --git a/docker/uwsgi.dev.ini b/docker/uwsgi.dev.ini index e476e216..c4c5d0aa 100644 --- a/docker/uwsgi.dev.ini +++ b/docker/uwsgi.dev.ini @@ -28,10 +28,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 = 2 -enable-threads = true # Optimize for streaming http = 0.0.0.0:5656