## TL;DR

Either uWSGI workers crash and restart in a loop, or Sentry partially works: some events arrive, tracing data is missing, breadcrumbs stop.

## Steps

1. 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.

2. 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.

3. Both flags are required:

```
uwsgi --enable-threads --py-call-uwsgi-fork-hooks ...
```

4. `--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.

5. 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`.

6. 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.

## When to use

You are seeing this: Everything is fine under runserver locally. Use this skill when you run into "Diagnose: Django on uWSGI, workers crashing or Sentry half-dead".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

uWSGI does not support threads by default, and the Sentry SDK depends on background threads for its transport and several features.

## Edge cases

- Also confirm you are not running with --lazy or --lazy-apps in a way that initializes the SDK per worker without the fork hooks.
