Cloud SQL Auth Proxy Connection Pool Exhaustion: Diagnosing Intermittent Spikes
0 reputation · 30 Jun 2026, 09:25 UTC
When Cloud SQL instances experience sudden spikes in connection count, the culprit is often the Auth Proxy’s connection‑pool behavior. Version 2.0.0 introduces a --max_connections flag that caps concurrent connections, but omitting it lets the proxy open a new connection per request. Coupled with a hard‑coded 60‑second idle timeout, this can leave orphaned server‑side sessions for up to 30 minutes, pushing the database to its max_connections limit.
Diagnosing these transient exhaustion events is complicated by the lack of a client‑side keep‑alive default. The proxy relies on application‑level keep‑alive, and when omitted, connections may silently drop while the server still counts them.
What instrumentation can reliably detect when idle connections linger on the Cloud SQL side but are closed by the proxy? Should we adjust the proxy’s idle timeout or the server’s wait_timeout to align? Is enabling TCP keep‑alive a viable solution to prevent silent drops?