This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Connection Pooling

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi everyone

i know few things about connection pooling like it keeps a specified number of connections in a pool
and we use those connections during the run time insted of directy hitting the database

correct if am wrong

and what i would like to know is that can i increase the number of connection in the conection pool
during runtime so that if my all the connection in the connection pool are busy i can create a new connecton to the database
to assign to that xtra request
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Amol More wrote:
i know few things about connection pooling like it keeps a specified number of connections in a pool
and we use those connections during the run time insted of directy hitting the database



Correct.

Amol More wrote:
and what i would like to know is that can i increase the number of connection in the conection pool
during runtime so that if my all the connection in the connection pool are busy i can create a new connecton to the database
to assign to that xtra request



[not sure]Yes,you can increase the number of Connections in pool. web server has such a facility .
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

can i increase the number of connection in the conection pool during runtime so that if my all the connection in the connection pool are busy i can create a new connecton to the database to assign to that xtra request


No, that's generally not possible. The pool should be sized large enough to cover all situations; a size of 50 should be sufficient for heavily used applications. If more clients access the system, then it may not be a good idea to open more connections, since the DB is already working on 50 queries simultaneously. Starting more will just slow down everybody. It's better to put client requests on hold until a pool connection becomes available.

Also note that there's not much of a penalty for sizing the pool larger. Decent pool implementation will generally release unused connections after a while, thus keeping the number of open connections to a minimum.
 
Amol More
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for all your reply
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic