-
1. Re: Thread BLOCKED on registerConnection/unregisterConnectio
vickyk Sep 7, 2007 3:07 AM (in response to alrubinger)There seems to be couple of possibilities
1) Long running genuine SQL's
2) Untuned SQL's which are taking longer time to get execute thus making the connection unavailable to pool for longer time .
For the "long running SQL's " you would have to configure the pool with larger number of connections and for the latter case you got to optimize the application code (fine tune SQL's) . -
2. Re: Thread BLOCKED on registerConnection/unregisterConnectio
alrubinger Sep 7, 2007 10:16 AM (in response to alrubinger)Very helpful, thank you. Took a look at the root of some of these, X-referenced with with "Slow Query Log" on our DB, and found this to very possibly be the root of the problem.
-
3. Re: Thread BLOCKED on registerConnection/unregisterConnection?
vkopichenko Mar 20, 2012 8:20 AM (in response to alrubinger)During performance tests on JBoss 4.2.3.GA we've also faced much BLOCKED threads on
org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:288)
and
org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:318)
The connection pool was not exhausted.
Digging in sources led to this:
286 if (debug)
287 {
288 synchronized (connectionStackTraces)
289 {
290 connectionStackTraces.put(connection, new Throwable("STACKTRACE"));
291 }
292 }
So the problem is not about slow sql but about debug synchronization.
This can be disabled in deploy/jbossjca-service.xml with <attribute name="Debug">false</attribute>.
It gave us 25% performance improvement!