File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Finding Connection Leaks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Finding Connection Leaks " Watch "Finding Connection Leaks " New topic
Author

Finding Connection Leaks

Mike Fourier
Greenhorn

Joined: Apr 02, 2008
Posts: 25
Jboss 3.2.6 on linux 2.6.8 using JVM 1.4.2_06-b03

Ok, I'm not sure of the proper terminology for these things, so I'll just hope this is enough info.

JMX Console:

Domain: jboss.jca
service: LocalTxCM
name: fooDS

On that page, there are two links to other MBeans, CachedConnectionManager and ManagedConnectionPool.

Clicking through to the ManagedConnectionPool, I see that slowly but surely as time goes by, the AvailableConnectionCount approaches zero. If I ever do let it reach zero, the Help Desk email start up immediately with "I can't login!", etc, etc. All I need to do, at the bottom of the page, is click the 'Invoke' button for the flush() method. Then it shoots back up to 100. So I obviously have some sort of leak.

I used to have to do this at least 2-3 times per week. We've just deployed an upgrade, and all day yesterday the pool sat at 100. Ooops, this morning I see it's at 93. So there must still be some leaks.

Now I turn to CachedConnectionManager. There is an 'invoke' button for the method listInUseConnections(). Hopefully this will give me some clues as to where the "in use" (but actually leaked) connections are.

Holy doodle! The 'InUseConnections' attribute says 536!! And the listing I get is huge! (536 stack traces).

Our connection pool is supposed to be 100. But 'in use connections' are far in excess of that. What am I not understanding?
Mike Fourier
Greenhorn

Joined: Apr 02, 2008
Posts: 25
Just thought I'd bump this.

Is anyone experienced in finding connection leaks in JBoss-hosted (EJB) applications?

Googling, I see things that surround those classes I mentioned:
CachedConnectionManager
and
ManagedConnectionPool

But I'm not sure why I'm getting 500+ listings when I click the 'InUseConnections'. Clearly this doesn't mean what I think it means.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

kishore routhu,
Your post was moved to a new topic.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Finding Connection Leaks