cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Trying to solve a database connection leak

Hello guys,

first of all, sorry for the bad english

I'm trying to reproduce this solution on this post:

https://answers.dynatrace.com/questions/159963/dat...

for a problem we are facing here with the application not closing all the opened connections causing the pool being filled and finally the application getting stucked.

The problem is... I cant instrument the "connection aquisition" part on the Purepath tree making me unable to make a business transaction like the one in the post above...

app: jboss 4.3

Any suggestions???

Thanks in advance,

Douglas.

8 REPLIES 8

jacob_payne
Inactive

Hi Douglas,

Why can't you instrument the connection acquisition part on the PurePath tree? Can you not find the methods, or did you create a sensor for the getConnection() and closeConnection() methods but they are not showing up?

Regards,

Jake

Hi jake,

sorry for the bad english...

Like you said, even after I "hot sensored" the agents after adding these methods you mentioned but they arent showing up.

I suspect the hot sensor placement isnt working, even when it shows that it worked just fine.

Hello Douglas,

Hot sensor placement is for Oracle (Sun) JVM but not for IBM JVM, so in case of IBM you will have to restart the application.

Secondly make sure that after created the custom sensor as @Jake P. suggested, placed in the agent group and this should be before hot instrumentation or restarting the application.

Regards,

Babar

Ok guys, thanks for your help, I found the methods...

but then when I create the business transactions with the number of invocations of the getconnection method and closeconnection with a URI filter, it is just counting 1 for these measures in business transaction... even if the connectivity methods are called more than 1 time in purepaths.

Have anything am I doing wrong? When I chart the measures alone it looks fine but when I apply the URI filter, it only counts 1...

any help 'll be appreciated

thanks in advance

Douglas.

Hi Douglas,

What is the aggregation you are using for the business transaction result measures? Try "sum".

result-measure-aggregation.jpg

Kind Regards,

Jake

Hello Douglas,

Did you add both custom measures in the Calculate Results and set the aggregation as count?

Regards,

Baba

Jake and Babar,

I made the modifications you suggested and it worked like a charm.

Thanks you all for the help.

Douglas.

gfishman
Participant

Douglas, I'm also trying to troubleshoot a leak in hibernate. Do you recall exactly which were the right classes to instrument getConnection and closeConnection on?

Thanks