How to monitor database connections in Jira

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article provides some examples on how we can monitor Database connection usage in Jira.

Environment

Jira 8 and above

Solution

Database monitoring graph

Jira has a built-in database connection pool graph in which we can see the available connections in the pool and the active ones:

https://confluence.atlassian.com/adminjiraserver/monitoring-database-connection-usage-938847726.html

Performance log file

The atlassian-jira-perf.log is one of the useful logs we may parse to get Database Connection usage info over time.

The lines we're interested are the PLATFORMINSTRUMENTS records that contain values for "dbcp.numActive", meaning the number of active DB connections at that time.

Grepping the log as follows will produce an output similar to the one below, with the timestamp and the number of active connections at (roughly) every minute:

1 $ cat atlassian-jira-perf.log | egrep 'dbcp.numActive","value":"[0-9]*"' | sed -E 's/,[0-9]{3}.*dbcp.numActive",/ /g' | sed -E 's/\},\{.*$//g' | sed 's/"value"://g' | sed 's/"//g' | cut -d" " -f-3
1 2 3 4 5 6 7 8 9 2020-12-03 13:59:23 49 2020-12-03 14:00:16 50 2020-12-03 14:01:09 47 2020-12-03 14:02:00 46 2020-12-03 14:02:50 50 2020-12-03 14:03:51 46 2020-12-03 14:07:54 1 2020-12-03 14:08:54 1 2020-12-03 14:09:54 1

You may compare those values with the dbconfig.xml <pool-size> parameter to confirm the DB pool hasn't been a performance bottleneck.

Also check Tuning database connections!

Updated on March 6, 2025

Still need help?

The Atlassian Community is here for you.