Giter Site home page Giter Site logo

Comments (6)

ben-page avatar ben-page commented on June 11, 2024 1

Does that mean I should not run queries more than max connections in pool

In general, no. It does not mean that. But I would not allow slow queries to take all of the available connections. No other work can get done. This is the purpose of the timeout: to throw an error rather than just wait forever for a connection.

I'm not sure what you are trying to do. But you could create a dedicated connection pool for your slow queries and disable the acquire timeout. But be careful. If one of your queries creates a deadlock or has an infinite loop, you'll never know. The connection pool will just wait forever.

Also from this example, there shouldn't be any available connections for i=3,4,5. So those queries should have waited for connections to be released and available into the pool.

That's right. 0,1,2 get the connections immediately. When any of those 3 connections are released, it will be made available to 3,4,5.

from tedious-connection-pool.

ben-page avatar ben-page commented on June 11, 2024

Looks like this is working as intended. The acquire timeout is how long acquire will wait for an available connection.

from tedious-connection-pool.

ankurgupta4891 avatar ankurgupta4891 commented on June 11, 2024

Does that mean I should not run queries more than max connections in pool ? I think acquire time should start when there is a free connection available and a query request is trying to acquire a connection from the pool, but it seems if there are more queries than no of connections in pool, many queries (that couldn't get connections) will die because of acquire time out. What is ideal way to queue queries then?

from tedious-connection-pool.

ankurgupta4891 avatar ankurgupta4891 commented on June 11, 2024

Also from this example, there shouldn't be any available connections for i=3,4,5. So those queries should have waited for connections to be released and available into the pool.

from tedious-connection-pool.

ankurgupta4891 avatar ankurgupta4891 commented on June 11, 2024

I get your point and understood acquire time out definition totally wrong. Thank you so much for clarification.

from tedious-connection-pool.

ben-page avatar ben-page commented on June 11, 2024

No problem.

from tedious-connection-pool.

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.