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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

Sid
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Dec 23, 2018

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.

Comment

Log in or Sign up to comment