This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Connection pool - check what blocks connections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection pool - check what blocks connections" Watch "Connection pool - check what blocks connections" New topic
Author

Connection pool - check what blocks connections

Michal Glowacki
Ranch Hand

Joined: Mar 14, 2006
Posts: 114
hi all,

I have sometimes a problem with connections being blocked in pool. I use JBoss AS and Postgres, connection pool with standard params: max size 100, blocking timeout 30000ms. Usually I see that 0-5 connections are in use, but there are moments (once per few days, but as I keep getting more and more visitors it's more often now) when I got 60, and even 100 and start getting 'no managed connections available' error. Flushing pool helps.

Probably some parts of the code are blocking connections. How can I find them?

Regards,
Michal
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

I'd guess there are cases where connections aren't properly closed. All places where connections are established should be followed by a finally {} block that closes the connection.


My Blog: Down Home Country Coding with Scott Selikoff
 
 
subject: Connection pool - check what blocks connections
 
Similar Threads
Jboss connection pool not releasing the connection from pool
Glassfish error
What is non blocking in nio
running out of ManagedConnections available
Deadlock with JDBC connection