Cloud SQL Auth Proxy and Cloud Run Application Connection Pools: Which Limit Governs Exhaustion Behavior?
0 reputation · 19 Jun 2020, 21:13 UTC
0 reputation · 19 Jun 2020, 21:13 UTC
A Cloud Run service uses an application-level connection pool (for example, HikariCP with maxPoolSize=20) while the Cloud SQL Auth Proxy sidecar runs with --max_connections=10. Both components enforce a connection ceiling, but the documented interaction between the two limits is not explicit about which one effectively governs backend connection creation under load.
The Auth Proxy acts as a pass-through forwarder; prior to v1.30.0 it had no --max_connections flag at all. When the flag is set lower than the application pool, excess client connections are queued or rejected, yet the proxy’s own metrics are not directly exposed in Cloud Monitoring. Unix-socket mode can multiplex streams, potentially masking exhaustion until the socket’s internal queue fills. The Cloud SQL instance itself also enforces a tier-dependent maximum, which may be lower than either configured limit.
--max_connections differ, which limit determines the point at which new backend connections are refused?A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.