Comments (4)
have the same problem right now. But in my case, I have one region (europe-west1-b), and timeout happens in a random manner (so it can work for instance, for 2-3 hours, then disconnect by timeout). I even can't find out the reason.
from cloud-sql-proxy.
Sorry for the delay. This is very interesting!
Are both GCE VMs running the exact same code? Is the Cloud SQL Database in the same zone as either of those VMs, or is it in yet a third?
from cloud-sql-proxy.
The VMs are in us-east1-c and us-east1-d. Not sure which zone the database is in, it just says "Location: us-east1". Both VMs are set up with the same provisioning script around the same time, so should be very similar.
In my Django app I had CONN_MAX_AGE
set to 60, meaning that every database connection is used for up to one minute and then is closed and reopened. I had a hunch that these errors happen when closing and re-opening the database connection (maybe cloud_sql_proxy needs to refresh its credentials and that part times out?). I changed CONN_MAX_AGE to None for unlimited persistent connections. I haven't seen these "connection timed out" errors since then (2+ weeks now, and about the same amount of traffic).
from cloud-sql-proxy.
Yes, if your app is closing connections after 60 seconds that can definitely cause the sort of messages from the Proxy that you posted in the original issue, but it is still a little weird that the django app was also seeing errors related to that closing.
Since the issue has gone away I will close this issue since it seems you've found a workable workaround. If that ceases to be stable please feel free to reopen the issue!
from cloud-sql-proxy.
Related Issues (20)
- v2/internal/proxy: TestClientInitialization failed HOT 2
- v2/tests: TestPostgresIAMDBAuthn failed HOT 1
- Do not require strict order in env variables for connections HOT 2
- Add support for a lazy refresh
- pgbouncer + proxy with transaction pooling is slow HOT 23
- Is there any way to connect to MS SQL using domain credentials? HOT 7
- v2/tests: TestSQLServerAuthentication failed HOT 4
- Telemetry doesn't work with non-ADC
- v2/internal/proxy: TestCheckConnections failed HOT 2
- Connecting to cloud-sql using private-ip sometimes fails with a TLS handshake timeout HOT 7
- Availability of a Container Image on Google Artifact Registry HOT 2
- "Cloud SQL IAM service account authentication failed for user ..." intermittent errors when connecting to Postgres HOT 17
- CSQL_PROXY_ADDRESS requires an IP address but doesn't explicitly state so HOT 6
- 30s+ Hang When Using Manual Token Authentication HOT 7
- v2/internal/proxy: TestClientLimitsMaxConnections failed HOT 1
- v2/internal/proxy: TestClientCloseWaitsForActiveConnections failed HOT 1
- v2/internal/proxy: TestClientClosesCleanly failed HOT 1
- v2/internal/proxy: TestClosesWithError failed HOT 2
- v2/internal/proxy: TestClientConnCount failed HOT 2
- v2/internal/proxy: TestRunConnectionCheck failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-sql-proxy.