## TL;DR

The fix is in your uWSGI invocation: `` uwsgi --enable-threads --py-call-uwsgi-fork-hooks... `` Both flags. If you run Django under uWSGI and Sentry behaves erratically, check these before anything else.

## Steps

1. The docs call this out explicitly: uWSGI does not support threads by default, and the Sentry SDK relies on background threads. Symptoms range from features silently not working to uWSGI workers crashing. The fix is in your uWSGI invocation:

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

## When to use

You are seeing this: ``python import sentry\_sdk sentry\_sdk.init( dsn="\_\_\_PUBLIC\_DSN\_\_\_", send\_default\_pii=True, # attaches user id/email/username via django.contrib.auth traces\_sample\_rate=0.1, ) `` Init in settings or as early as the process starts. Use this skill when you run into "Sentry Django: uWSGI threads and the shell-verification trap".

## 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

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
