GithubHelp home page GithubHelp logo

Comments (4)

ega-forever avatar ega-forever commented on July 21, 2024 1

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.

Carrotman42 avatar Carrotman42 commented on July 21, 2024

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.

cuu508 avatar cuu508 commented on July 21, 2024

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.

Carrotman42 avatar Carrotman42 commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.