Troubleshooting connection timeouts
Find where a hanging query is timing out, from your database connection to your load balancer or proxy.
If your queries are hanging or timing out, the problem could be coming from your:
- Database connection
- Load balancer
- Reverse proxy server (e.g., Nginx)
- Jetty
- Cloud service
Metabase also has its own timeouts. By default, Metabase cancels queries that run for longer than 20 minutes, and gives up connecting to a database after 10 seconds (for example, when you test a database connection). On self-hosted Metabases, you can change these limits with the MB_DB_QUERY_TIMEOUT_MINUTES and MB_DB_CONNECTION_TIMEOUT_MS environment variables.
Resources for common deployments
Fixes for timeout problems will depend on your specific setup. These resources may help:
- Jetty connectors
- EC2 Troubleshooting
- Elastic Load Balancing Connection Timeout Management
- App Engine: Dealing with DeadlineExceededErrors
Are you still stuck?
If you can’t solve your problem using the troubleshooting guides:
- Search or ask the Metabase community.
- Search for known bugs or limitations.
Read docs for other versions of Metabase.