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

  • Home
  • SEARCH
  • 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 72553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:03:46+00:00 2026-05-10T20:03:46+00:00

What is the best way to setup your pool with respect to:- When do

  • 0

What is the best way to setup your pool with respect to:-

  1. When do you create connections?
  2. When do you close connections, and would you close all of them?
  3. Do you test connections are still good. When and how?
  4. How do you figure out a good number for the maximum number of connections?
  5. What sort of monitoring do you have in place to ensure users of the pool are well behaved? Can you stop one bad piece of code from taking out everything?
  6. Have you written your own pool, or used a third-party library?

I believe this is an agnostic question, but comments about ‘features’ of particular databases/languages are welcome. For example, it might be slower or more expensive to connect on some databases than others.

To clarify, I do not intend to write a pool from scratch, this question is more about how to configure an existing library that does pooling.

  • 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. 2026-05-10T20:03:46+00:00Added an answer on May 10, 2026 at 8:03 pm

    I wrote a connection pool for the database in Java when it was just a design pattern and not a common library. Now I use the one built into Tomcat.

    I used a thread to monitor several aspects of the pool and several parameters to control its behavior…

    1. minimumInPool=’3’… These first three are created upon launch. The pool is never allowed to drop below three.
    2. maximumIdleTimeBeforeRemoval=’60’… If a connect is idle for an hour, then drop it and create a new one. Idle time probably means there is only the minimum of three in the pool.
    3. maximumInUseTimeBeforeRemoval=’30’… If a given connection has been checked out for over 30 minutes, then something is probably wrong. Recall it, and kill the connection.
    4. maximumTimeBeforeRemoval=’60’… Remove it if it is over 60 minutes old.
    5. maximumUsageBeforeRemoval=’1000’… Remove it if it has been checked out over 1000 times.
    6. monitorInterval=’15’… Check the above parameters every 15 minutes.

    This served me very well for a couple of years. The highest I ever saw the pool was 151 connections during a wild peek. Usually the pool was at about a dozen during heavy usage and idled down to the minimum three in the early morning hours.

    I used Oracle’s JDBC thin drivers and connected to an Oracle database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I have a single-user machine with no disk quota in… May 11, 2026 at 11:19 am
  • added an answer I can't recall it from the top of my head… May 11, 2026 at 11:19 am
  • added an answer — is wrong. When you use numeric character references, the… May 11, 2026 at 11:18 am

Related Questions

What is the best way to setup your pool with respect to:- When do
What is the best way to setup one Linux box to listen on its
What is the best way (in C++) to set up a container allowing for
What is the best way to verify/test that a text string is serialized to
What is the best way to authorize all users to one single page in
What is the best way to store international addresses in a database? Answer in
What is the best way to include an html entity in XSLT? <xsl:template match=/a/node>
What is the best way to iterate through a strongly-typed generic List in C#.NET
What is the best way to manage a list of windows (keeping them in
What is the best way to create redundant subversion repositories? I have a subversion

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.