Viewing logs
Most issues surface in the service logs. Start by checking the relevant service:Common issues
502 Bad Gateway
Symptom: The browser shows a 502 or “Bad Gateway” error when accessing Sentry. Cause: Theweb service is not running or is not reachable by the reverse proxy.
Fix:
SENTRY_SECRET_KEY, a database connection failure, or a failed migration.
Events not appearing
Symptom: You’re sending events to Sentry but they don’t appear in the UI. Cause: Relay is not running, misconfigured, or the Kafka consumers are stopped. Fix:Email not sending
Symptom: Alerts, notifications, and password reset emails are not being received. Cause: SMTP is not configured, or theworker service is not running.
Fix:
-
Check that
SENTRY_EMAIL_HOSTis set in.env -
Check worker logs for email delivery errors:
-
Test the SMTP connection from within the container:
- Verify no firewall rules are blocking outbound connections on the configured SMTP port.
High memory usage
Symptom: The host is running out of memory, or containers are being OOM-killed. Cause: Worker concurrency is set too high, or a runaway process is consuming memory. Fix:sentry.conf.py:
Database connection errors
Symptom: Errors likecould not connect to server or too many connections in the web or worker logs.
Cause: PostgreSQL is not running, has reached max_connections, or the credentials are wrong.
Fix:
max_connections, either reduce the number of web/worker processes or increase max_connections in your PostgreSQL configuration:
Migration errors
Symptom: Errors during./install.sh or docker compose run --rm web upgrade, such as relation does not exist or lock timeout errors.
Cause: A previous migration was interrupted, or there are long-running queries holding locks.
Fix:
-
Take a database backup before attempting recovery:
-
Check for blocking queries:
-
If a query is blocking migrations, terminate it (use the PID from the query above):
- Re-run the install or upgrade command.
Accessing the Django shell
For advanced debugging, you can open a Django shell inside theweb container:
Running management commands
You can run any Sentry management command usingdocker compose run:
Getting help
If you can’t resolve an issue with the above steps:- GitHub Issues: github.com/getsentry/self-hosted/issues — search for existing reports before opening a new one
- Discord: Join the Sentry Discord and ask in the
#self-hostedchannel
- Your Sentry version (
docker compose exec web sentry --version) - Relevant service logs
- Your host OS and Docker version