• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pooling

 
Amol More
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • 0
  • Mark post as helpful
  • send pies
  • 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 .
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • 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: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for all your reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic