Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8023535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:35:22+00:00 2026-06-04T22:35:22+00:00

I am new to hibernate and spring. We’ve a spring based service, which is

  • 0

I am new to hibernate and spring. We’ve a spring based service, which is using oracle database using hibernate. This service is deployed to 4 hosts.

We have one external java client which is using our service. It makes about ~40 service calls per second. So ideally there should be at most 40(calls)*4(hosts)=160 open connections. But for some reason, the DB connections used by our service grow even more than 600.

Can we set up some metrics for checking the leak in DB connections? How can we find out these leak connections?

Any help would be appreciated.

Thanks,
Kevin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:35:23+00:00Added an answer on June 4, 2026 at 10:35 pm

    If you are using 3rd party jars for connection polling then you can enable their logging and set logAbandoned property to true. So it will log your all logAbandoned connections.

    As shown below –

    <bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource" destroy-method="close">
            <property name="driverClassName" value="${dataSource.driverClassName}" />
            <property name="url" value="${dataSource.url}" />
            <property name="username" value="${dataSource.username}" />
            <property name="password" value="${dataSource.password}" />
            <property name="validationQuery" value="${datasource.validationQuery}" />
            <property name="maxActive" value="${datasource.maxActive}" />
            <property name="maxIdle" value="${datasource.maxIdle}" />
            <property name="maxWait" value="${datasource.maxWait}" />
            <property name="testOnBorrow" value="true" />
            <property name="testWhileIdle" value="true" />      
            <property name="minIdle" value="${datasource.minIdle}" />
            <property name="initialSize" value="${datasource.initialSize}" />
            <property name="timeBetweenEvictionRunsMillis" value="${datasource.timeBetweenEvictionRunsMillis}" />
            <property name="logAbandoned" value="${datasource.logAbandoned}" />
    </bean>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Hibernate in Spring MVC 3.05 and an Oracle database. I have
I'm quite new to hibernate and have stumbled on this problem, which I can't
now I'm handling new module, its using Hibernate and spring, I'm new for this
I m new to Jboss, but I have multiple web applications each using spring-hibernate
I am new to Hibernate. I have an exception while running an Hibernate-based application.
I am new to hibernate and I am stumped. In my database I have
I am using Spring+Hibernate for an operation which requires creating and updating literally hundreds
I'm beginner at hibernate and spring framework. I want to insert into database using
I have a Java\Spring\Hibernate application - complete with domain classes which are basically Hibernate
I have a com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException in my code (using Hibernate and Spring) and I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.