GithubHelp home page GithubHelp logo

Comments (4)

firegnome avatar firegnome commented on July 21, 2024 1

@charlesa101 I had the same error messages but my problem was, that I wasn't using a connection pool for my java spring application. I was using this class as data source:

https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/jdbc/datasource/DriverManagerDataSource.html

And here it says:

NOTE: This class is not an actual connection pool; it does not actually pool Connections. It just serves as simple replacement for a full-blown connection pool, implementing the same standard interface, but creating new Connections on every call.

Since i moved to Hikari (a true connection pool) i don't have these log messages anymore and the open connections remain on 10 (the default pool size):

https://brettwooldridge.github.io/HikariCP/

Btw: If you are using django you have a similar problem. Django opens by default a new database connection for every request.

Source: https://docs.djangoproject.com/en/2.1/ref/databases/

Persistent connections avoid the overhead of re-establishing a connection to the database in each request. They’re controlled by the CONN_MAX_AGE parameter which defines the maximum lifetime of a connection. It can be set independently for each database.
The default value is 0, preserving the historical behavior of closing the database connection at the end of each request. To enable persistent connections, set CONN_MAX_AGE to a positive number of seconds. For unlimited persistent connections, set it to None.

from cloud-sql-proxy.

pavel-kurnosov avatar pavel-kurnosov commented on July 21, 2024

After long debugging I found that it was issue with pod on cluster, for some reason now initialization for postgresql slower then before, and k8t restarted my pod as not ready for long time. I changed time to check and all looks fine. Maybe can help someone who willl have same issues.

from cloud-sql-proxy.

Carrotman42 avatar Carrotman42 commented on July 21, 2024

from cloud-sql-proxy.

charlesa101 avatar charlesa101 commented on July 21, 2024

Is this issue closed? having the same problem with mysql cloudsql connection?

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.