How do I refresh the connection pool in JIRA?

Randall Fisher
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.
September 16, 2013

Our JIRA instance is using one of our production Oracle databases, along with other support services. From time to time the DBA's need to restart that database. As a result, the open db connections start throwing broken pipe errors. It appears that JIRA (probably Tomcat) closes these as they throw errors with use and open new connections. As a pro-active measure, we have restarted JIRA to clean these connections out. We would rather leave the JIRA instance alone and only address refreshing the connection pool. I am not seeing anything in JIRA to do this. Also, I am reluctant to go poking around in that Atlassain configured Tomcat install without some Atlassain documentation to back up this approach. (unless someone else has already) Ideally, we are looking for a CLI answer and possibly cron this task.

1 answer

1 accepted

1 vote
Answer accepted
JamieA
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.
September 16, 2013

If you specify a validation-query, ie "select 1 from dual", it will be tested when it's borrowed from the pool.

See atlassian's docs for exact details.

However I'd recommend you just get the oracle DBAs to stop bouncing the database.

Randall Fisher
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.
September 17, 2013

Thanks, I see that now. And I see the same thing for Confluence, and I will use that there too. This feautre lines up with the behaviour we were seeing were the 'bad' connections seem to dissapear over time. With this, the user never sees an error.

It is no fault of the DBA's as they are under the same artifical constructs created by the archetypal obstinance of management as the rest of us.

JamieA
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.
September 17, 2013

Hrm, so they say.

There is a cost to this. Indexing on my oracle instance takes 3 hours without the validation query, and 4 hours with. In a 2 hour period during the indexing, the validation query was seen to run 4 billion times. Unless you have very low latency you are going to feel the effects of that.

Anyway, last weekend I moved from oracle to postgres, and now it's all gravy. Annoyingly though, I see Atlassian are just starting to fix some of the oracle-specific bugs.

Suggest an answer

Log in or Sign up to answer