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 votes
Accepted answer

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.

Thanks, Eddie.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,290 views 5 10
Read article

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