database connections - sleeping = 20 typical?

We are running JIRA 6.2 connected to MySQL. A DBA came to me with a question about the 20 open connections JIRA is holding, which are all sleeping (we are not a busy instance). Are this number necessary? Performance enhancing? I see under Instrumentation: dbcp.maxActive Gauge 20 and related running = 0 and sleeping = 20. Can this be tuned?

1 answer

1 accepted

0 vote
Eddie Webb Community Champion Mar 26, 2014

Yes, the size and properties can be tuned by editing dbconfig.xml in the root of the home directory.

I think this one, pool-min-idle may help your DBA's concern. WHich by default is == to max connections apprenently.

The minimum number of database connections that are allowed to remain idle in the pool.

Having this value set to that of Maximum Size (above), which is the case by default, means the pool will always have a fixed number of connections and idle connections will never be closed.

The trade off is that in the event of a spike in use, that the system could easily want to scale up to the max of 20 connections, but be delayed by the overhead of establishing new connections. (sounds trivial but db interactions should be on the multi-millisecond range to allow a modern app to be responsive)

Unless your DBA has real concerns, and isn't just curious I would encourage you to keep them equal. It should be common for apps connection to a DB to hold 10-30 connections, and the database servers should be scaled accordingly in my opinion.

But if you do want to tune them down, use a decent APM tool (a newrelic free account wwould suffice) and watch the response times of end to end transactions throughout the work week. Build a baseline first (with 20 idle pool) and then step down slowly (<5) and see if week over week changes for the worse.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,321 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot