sqlalchemy.exc.TimeoutError: QueuePool limit of size 8 overflow 8 reached, connection timed out #39993
Replies: 1 comment
-
|
That error is about Superset's metadata DB pool, and it's a per-worker pool. Each gunicorn worker has its own pool of pool_size + max_overflow = 8 + 8 = 16 connections. When a big dashboard refreshes, one worker fires many chart queries at once (each needs a metadata connection for logging/results), blows past 16 concurrent, and the 17th waits pool_timeout=90s then throws. Raising the pool "didn't help much" because you also have a hard ceiling: total connections = workers × (pool_size + max_overflow). With gevent and 10 workers you must keep that under Postgres max_connections=200, minus Celery's own usage. 10 × 16 = 160 today; you can't just crank pool_size to 50 (10 × 100 = 1000 >> 200). Two ways forward:
For a quick unblock use option 1; for a real load pattern, do option 2. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We are facing this issue when large dashboards with multiple charts are refreshed. We tried tuning pool size but that did not help much,
sqlalchemy.exc.TimeoutError: QueuePool limit of size 8 overflow 8 reached, connection timed out, timeout 90.00 (Background on this error at: https://sqlalche.me/e/1>
current config:
Gunicorn | gevent, 10 workers ×250 connections
Celery | 2×6
Postgres | max_connections = 200
Postgres & redis same host as superset
Beta Was this translation helpful? Give feedback.
All reactions