Question
Intermittent Doctrine DBAL Connection Pool Exhaustion in Shopware 6
Tasadduq BurneyownerOwner · Founder
21K reputation · 31 Mar 2026, 23:57 UTC
10.2K views0
Diagnosing intermittent connection pool exhaustion
The goal is to determine why a Shopware 6 installation occasionally fails with 502/503 errors under high load, suspected to be caused by Doctrine DBAL’s limited connection pool.
Key constraints:
- Default pool size is 5 connections per connection type.
- Persistent connections are disabled by default but can be enabled via
config/packages/doctrine.yaml. - Pool size does not automatically scale with multiple PHP‑FPM workers or Docker containers.
- Shopware provides no built‑in per‑environment pool configuration.
Unresolved decisions or behaviors:
- Whether enabling persistent connections will reduce exhaustion or introduce stale data.
- How to determine the optimal pool size for a given traffic profile.
- Whether the current pool configuration scales correctly across containerized deployments.
Specific questions to guide investigation:
- What is the maximum number of concurrent PHP processes that a 5‑connection pool can support without hitting exhaustion?
- Does enabling persistent connections in a shared hosting environment lead to stale data or other side effects?
- How does the pool size behave when running multiple PHP‑FPM workers or Docker containers—does each worker maintain its own pool or share a global pool?