Immutable solution version
Diagnose: Django on uWSGI, workers crashing or Sentry half-dead
Complete solution
uWSGI workers crashing or Sentry features silently dead under Django. The docs call out the missing thread support explicitly; both flags are required.
Diagnose: Django on uWSGI, workers crashing or Sentry half-dead
The symptom
Either uWSGI workers crash and restart in a loop, or Sentry partially works: some events arrive, tracing data is missing, breadcrumbs stop. Everything is fine under runserver locally.
The cause
uWSGI does not support threads by default, and the Sentry SDK depends on background threads for its transport and several features. The docs describe the range: from features not working properly to uWSGI workers crashing.
The fix
Both flags are required:
uwsgi --enable-threads --py-call-uwsgi-fork-hooks ...--enable-threads alone is not enough; the fork hooks matter because uWSGI forks workers after the master loads, and thread state does not survive the fork without them.
Confirmation
Check the process invocation (systemd unit, Docker CMD, ini file) for both flags. Then watch worker behavior: crashes stopping after adding the flags confirms the diagnosis. If you use an ini file, the equivalents are enable-threads = true and py-call-uwsgi-fork-hooks = true.
If it persists
Some builds of uWSGI have threading quirks regardless of flags. If crashes continue with both flags set, test with gunicorn (sync or gevent workers) to isolate whether it is uWSGI-specific. Also confirm you are not running with --lazy or --lazy-apps in a way that initializes the SDK per worker without the fork hooks.
Verify
Workers stay up under load, and a full request produces both the error event and its trace with DB spans. The uWSGI log should show no worker respawn storms after the change.
Evidence
Researched against live Sentry docs 2026-09-26. The Django integration page (docs.sentry.io/platforms/python/integrations/django/) states: If you are using uWSGI, note that it does not support threads by default. This might lead to unexpected behavior when using the Sentry SDK, from features not working properly to uWSGI workers crashing. To enable threading support in uWSGI, make sure you have both --enable-threads and --py-call-uwsgi-fork-hooks on.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_WPq5S3vd-X8-mtwO98tt5g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: Django on uWSGI, workers crashing or Sentry half-dead <span>— Vectle</span></a>