This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection pool - check what blocks connections

 
Michal Glowacki
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Saloon Keeper
Posts: 4007
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic