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 8844419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:28:55+00:00 2026-06-14T11:28:55+00:00

I am using MYSQL database and basic JDBC connection pool for connect to the

  • 0

I am using MYSQL database and basic JDBC connection pool for connect to the database. application is deployed in tomcat server. After few operations, database connection getting null.

could any one please let me know the reason for that ?

  • 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-14T11:28:57+00:00Added an answer on June 14, 2026 at 11:28 am

    This can happen for a few different reasons:

    1. Not calling close() on your Connection resources when you’re done with them. This can cause your connection pool to be exhausted after all the Connections are handed out and not closed.
    2. Calling close() on your Connection resources more than once. Closing a Connection returns it to the pool so another thread can grab it. If you call close() a second time, you’ve now closed it for the other thread.
    3. Your code is actually setting your Connection instance to null somewhere.
    4. You’re leaving a Connection resource open and idle for too long and it’s timing out on you. If your code has some long running operation between queries, consider closing the Connection and getting a new one between queries.
    5. The database server closed your connection for some reason and your connection pool doesn’t know about it. To mitigate this, you can configure your connection pool to test on borrow. This would basically issue a test query on the connection to make sure it’s alive before handing it over to you app. Note: there is some overhead there.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Mysql database and neatbeans IDE conncting by mysql-connector-java-5.1.21 jdbc , and I
I'm using a MySQL database and accessing it through Java. PreparedStatement prep1 = this.connection.prepareStatement(
I'm developing a J2EE 6 Web Application, using a MySql 5.02 DataBase. I'm trying
I am creating a application that store basic database connection info like host,user, password
I setup a Openfire server with external MySQL database using the openfire_mysql.sql file from
I was using Mysql database before and decided to switch to Postgresql and now,
I am using Mysql database. I have 3 table-: table Column tier_price customer_id,sku(Unique),price,website catalog_product
I am using MySQL database and JSP for a project. In my project there
I have created a MySQL database using MySQL Workbench. It has about 20 tables.
I'm using a MySQL database to store scores for my game. A very simplified

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.