Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Adaptavist Scriptrunner and Jira Database Connection Pool

Software Versions:

  • Jira Sever v7.6.3
  • Scriptrunner for Jira v5.3.9


I'm utilizing scriptrunner scripts triggered as a post function of an Epic transition to generate a number of related Story issues. The general purpose of these scripts is to facilitate "templated" construction of pre-defined project steps defined by the created Stories. The script will iterate through an array of attributes to:

  • Create the stories
  • Populate several fields on the story issues
  • Relate the stories to the Epic
  • Create issues linkages to "predecessor" stories as blocking issues

The scripts will create anywhere from 5 - 90 Story issues depending on the use case.

The issue I have encountered is that the process consumes all available database connections from Jira's database connection pool. This can effectively render Jira unusable during construction of the larger templates. It also appears to take up to several minutes for the connections to be released back into the pool upon completion of the script execution.

My question is this - is there a way to gate the number of database connections used from Jira's DB connection pool during execution of a Scriptrunner script? I'm less concerned with duration of script execution as I am with overall performance of Jira.




1 comment

Check existing usage of database connection pool

  1. Login to Jira as a Jira Administrator, and go to Settings >> System.
  2. Go to 'Database Monitoring' section and check your JIRA's database connection usage.
  3. If you see most of your connection pools getting used up, you would need to increase your DB Connection Pool size. By Default it is set to Maximum 20 connections.


Increase DB Connection Pool Size

  • We recommend increasing the Jira DB Connection Pool size to around 100.
    • To do that, edit the dbconfig.xml file located at: <JIRA_HOME_DIRECTORY>/dbconfig.xml
    • Change the <pool-max-size>20</pool-max-size>, property to 100
    • Save the updated dbconfig.xml file.
  • Change the "max_connections", database parameter in Jira DB as per the number of Jira users.
  • After making the above changes, restart the Jira and MySQL services.

Alternatively, you can also refer the Official Atlassian Documentation link here, for tuning the database connections.


Log in or Sign up to comment

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you