DBCP Datasource error on Jira

Hi All

My Jira instance (5.0.2) crashed all of a sudden. When I checked the error logs I got this. Can anyone please suggest how this can be handled in future?

Note : I had only 512 MB memory allocated to the jira instance. Is this error in anyway related to less memory allocation?

2013-02-19 05:18:38,191 http-8096-2 ERROR newcombe 318x5405x5 lt1f2c 10.8.1.42 /rest/gadget/1.0/issueTable/jql [NoModule] There was an error getting a DBCP datasource.
java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool

2013-02-19 05:18:39,801 http-8096-2 ERROR newcombe 318x5405x5 lt1f2c 10.8.1.42 /rest/gadget/1.0/issueTable/jql [search.parameters.lucene.DefaultPermissionQueryFactory] Error occurred retrieving security levels for this user

2013-02-19 05:18:43,332 http-8096-3 ERROR newcombe 318x5488x3 lt1f2c 10.8.1.42 /secure/ViewProfile.jspa [NoModule] There was an error getting a DBCP datasource.
java.lang.RuntimeException: Unable to obtain a connection from the underlying connection pool

2013-02-19 05:18:44,004 http-8096-3 ERROR newcombe 318x5488x3 lt1f2c 10.8.1.42 /secure/ViewProfile.jspa [webwork.util.ValueStack] METHOD: "avatarId", exception:
com.opensymphony.module.propertyset.PropertyImplementationException: Unable to esablish a connection with the database. (Out of memory (Needed 46320 bytes))

2 answers

1 accepted

This widget could not be displayed.

Looks like a loss of connection in the database pool:

https://confluence.atlassian.com/display/JIRAKB/Unable+to+obtain+a+connection+from+the+underlying+connection+pool

I would recommend setting the Validation Query and see if that helps:

https://confluence.atlassian.com/display/JIRA/Surviving+Connection+Closures

Cheers,

Pelle

Hi Pelle

Thanks for your comment. I checked and I already had the validation query in my dbconfig.xml. Looks like it fell apart due to memory limitations (512MB).

Rahul

This widget could not be displayed.

Check you are using the right database driver

Try increasing the pool size in dbconfig.xml

The last line implies memory size problems, but rule out the other two first.

Hi Nic....thanks for your comment. In my dbconfig i have these pool size configuration

<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>

What would be the recommended min and max pool size for a instance hosting 55K issues and 2K users?

On the datbase driver, I installed the MySQL Connector/J 5.1.23 that comes bundled in when installing the MySQL software. Is there anything else i need to do on the driver front?

Rahul

I'd leave the minimum pool size alone - it's more a case of "reserve enough for myself so that nothing else can degrade my performance" setting.

For the maximum pool size, the only time I've ever altered it was under the guidance of a DBA and a Tomcat expert. I seem to remember we jumped it to 100, but that was on dedicated hardware - the app server was for Jira and a handful of automated jobs related to it, the database server was running the Jira, Confluence and Fisheye databases but nothing else. However, 30,000 users and a shade over a million issues...

Not immediately.

I'd check the validation query to begin with ( https://confluence.atlassian.com/display/JIRA/Surviving+Connection+Closures ) then the driver version (yes, use the latest one that is valid for your MySQL, Tomcat and Java versions). Finally, start increasing the pool in steps of 10. Jumping to 100 is overkill - each pool connection has some overhead, so there's no point going higher than you need.

thanks Nic. Is there any drawback of jumping the max pool size to say 100 in spite of having a small installation (2K users). We have both the Jira installation and DB on the same 4 GB VM.

I checked the MySQL connector in the lib folder and it is mysql-connector-java-5.1.10.jar. Do you think I need to replace it with the latest available from mysql website?

Rahul

Bother, just seen Pelle's answer, which I've just repeated. Sorry Pelle!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

169 views 2 0
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