Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Database Connections Lifetime

Moderators: Vladimir Kondratyev, Anton Katilin

Database Connections Lifetime

Postby RickRoberts » Thu Sep 18, 2014 8:29 pm

Can someone help me understand the Performance Chart for:
Database Connections - Lifetime of Remaining Opened
Database Connections - Lifetime of Closed

Lifetime of Remaining Opened:
For my current application the "max lifetime" line is a straight line that continues to trend upward and never comes down.
The "average lifetime" trends upward for a while but then periodically drops down and then begins another upward trend.
( I wish I could send a screenshot ).

Lifetime of Closed:
This chart shows a straight line across the bottom of the graph with an occasional spike.

Also, is there some documentation somewhere that describes how to use these charts to tell if I have a healthy application or not?
RickRoberts
 
Posts: 2
Joined: Thu Sep 18, 2014 7:19 pm

Re: Database Connections Lifetime

Postby Anton Katilin » Fri Sep 19, 2014 4:43 am

Hi,

Life time is the time passed since connection was opened and until it was closed or, if not closed yet, current point in time.

Lifetime of Remaining Opened:

This chart presents life time of connections which have not been closed by the end of the sample, i.e. those which "survived" the corresponding time point in the chart.
You may use this chart to estimate for how long connections stay unclosed. Please hover the chart with mouse pointer to see the oldest surviving connection detail, if available.

For my current application the "max lifetime" line is a straight line that continues to trend upward and never comes down.

I can't tell whether your application is healthy or not basing on your observations because this depends on your application logic. If you see ever growing "max lifetime" this means there is at least one connection opened long ago and never closed. This may be OK if you know that there is a connection opened once on start and then used during entire application runtime, and not OK if you expect all connections are short living.

The "average lifetime" trends upward for a while but then periodically drops down and then begins another upward trend.

This likely means that connections are created with some constant (or near to) rate, and then several connections close at once. For example, this may be caused by not closing connections immediately after use, but later in finalize as a result of garbage collection.

You may check for GC activity in the time points when they drop. See corresponding chart under Basic Telemetry node.

Please also check the Database Connections - Open/close chart. If open and close counts stay balanced in time your application is likely OK. If the number of remaining (i.e. opened minus closed) connections constantly grows, or grows then suddenly drops, there may be a resource leak.

Lifetime of Closed:
This chart shows a straight line across the bottom of the graph with an occasional spike.

Presents connections closed in time interval between telemetry samples. Hover the chart with mouse pointer to highlight the interval and see detail, if available.

Please note that Performance charts provide limited statistics only. To see full detail use Events:
http://www.yourkit.com/docs/java/help/probes_ui.jsp

Best regards,
Anton
Anton Katilin
 
Posts: 5858
Joined: Wed Aug 11, 2004 8:37 am

Re: Database Connections Lifetime

Postby RickRoberts » Fri Sep 19, 2014 1:40 pm

Thank you very much for your detailed reply.
RickRoberts
 
Posts: 2
Joined: Thu Sep 18, 2014 7:19 pm


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.