Skip to main content
Skip table of contents

Database datasource - "Dangerous use of multiple connections" on local database

Symptoms

You are performing bulk operations which may update multiple Elements Connect fields and find the following error in the logs :

CODE
[c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: taken => count=2; marks=[1-0]; pool=7/8
[INFO] [talledLocalContainer] java.lang.AssertionError: Explicit stack trace requested
[INFO] [talledLocalContainer]   at com.atlassian.jira.util.log.RateLimitingLogger.warnWithTrace(RateLimitingLogger.java:124)
[INFO] [talledLocalContainer]   at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor$CountHolder.logWarn(ConnectionPoolHealthSqlInterceptor.java:236)
[INFO] [talledLocalContainer]   at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor$CountHolder.taken(ConnectionPoolHealthSqlInterceptor.java:252)
[INFO] [talledLocalContainer]   at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor.onConnectionTaken(ConnectionPoolHealthSqlInterceptor.java:89)
[INFO] [talledLocalContainer]   at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.lambda$onConnectionTaken$0(ChainedSQLInterceptor.java:64)
[INFO] [talledLocalContainer]   at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.forEach(ChainedSQLInterceptor.java:93)
[INFO] [talledLocalContainer]   at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.onConnectionTaken(ChainedSQLInterceptor.java:63)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.jdbc.interceptors.connection.SafeDelegatingSqlConnectionInterceptor.onConnectionTaken(SafeDelegatingSqlConnectionInterceptor.java:30)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.informInterceptor(ConnectionTracker.java:64)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection(ConnectionTracker.java:49)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.transaction.JNDIFactory.trackConnection(JNDIFactory.java:258)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.transaction.JNDIFactory.getJndiConnection(JNDIFactory.java:191)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:156)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:114)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.SequenceUtil$SequenceBank.fillBank(SequenceUtil.java:195)
[INFO] [talledLocalContainer]   at org.ofbiz.core.entity.SequenceUtil$SequenceBank.<init>(SequenceUtil.java:137)
[INFO] [talledLocalContainer]   at 


Cause

This message is logged by Jira as soon as it detects that one thread uses more than one connection to its database.


Resolution

There is no workaround as this a normal use case with Elements Connect which may take up to two connections by a thread. Usually, the duration of this operation is very short and should not have any significant impact on your instance.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.