-
Bug
-
Resolution: Fixed
-
Low
-
6.1, 6.2, 6.3, 6.4
-
6.01
-
Summary
DBPC configuration pool-prepared-statements set to true leads to Statement Leak, In case of Oracle DB it will be 'ORA-01000: maximum open cursors exceeded'
Steps to Reproduce
- Configure pool-prepared-statements to true
- Wait
Expected Results
No pool exception.
Actual Results
The below exception is thrown in the atlassian-jira.log file:
... java.sql.SQLException: ORA-01000: maximum open cursors exceeded at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:179) at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.find(DelegatingActiveObjects.java:93) <+2> (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) ...
Notes
DBCP bug: DBCP-372, fixed in 1.5/2.x, JIRA uses 1.3/1.4
Note from: https://commons.apache.org/proper/commons-dbcp/configuration.html
NOTE - Make sure your connection has some resources left for the other statements. Pooling PreparedStatements may keep their cursors open in the database, causing a connection to run out of cursors, especially if maxOpenPreparedStatements is left at the default (unlimited) and an application opens a large number of different PreparedStatements per connection. To avoid this problem, maxOpenPreparedStatements should be set to a value less than the maximum number of cursors that can be open on a Connection.
Workaround
Remove pool-prepared-statements option (set to false)
- causes
-
JRASERVER-44965 Documentation request: https://confluence.atlassian.com/display/JIRA064/Tuning+Database+Connections
- Closed
- depends on
-
JDEV-32990 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...