Coder Social home page Coder Social logo

DB Connection pool issue (in Azure Cloud platform with aggressive network timeout). Looked like leaked connections about ebean HOT 2 CLOSED

ebean-orm avatar ebean-orm commented on August 22, 2024
DB Connection pool issue (in Azure Cloud platform with aggressive network timeout). Looked like leaked connections

from ebean.

Comments (2)

rbygrave avatar rbygrave commented on August 22, 2024

To address this issue we needed to make some code changes to the pool (as described below) and change the datasource pool configuration maxInactiveTimeSecs to 180 (3 minutes).

The problems with the pool code were:

  • It didn't trim idle connections BEFORE it grabbed one to use for the 'heartbeat test'. So the pool could grab a 'broken/timed out' connection for the 'heartbeat test'.
  • It didn't trim idle connections frequently enough. A bug using the wrong 'wait time between trims'.
  • The 'heartbeat test' didn't have a Timeout on it.

In addition to fixing these issue I also did a little re-factoring and added some metrics collection (so that we can monitor connection pool workload relatively easily).

from ebean.

rbygrave avatar rbygrave commented on August 22, 2024

Fixed by 87a9482

from ebean.

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.