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?