Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-78283

Jira logs many "Dangerous use of multiple connections" warnings on startup

XMLWordPrintable

      Issue Summary

      Jira will log multiple "Dangerous use of multiple connections" warning messages on startup.
      The stack trace indicates that this behavior happens while reading application properties, which was refactored in Jira 9.15.0.

      Steps to Reproduce

      1. Set up JSM in the affected version
      2. Restart Jira
      3. Check atlassian-jira.log for occurrences of "Dangerous use of multiple connections."

      Expected Results

      Jira should not use an extensive number of multiple connections at startup

      Actual Results

      The below exception is thrown in the atlassian-jira.log file:

      2024-11-27 16:12:12,509+0000 Thread-312 WARN anonymous    

      [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections. Refer to Knowledge Base: https://go.atlassian.com/dangerous-use-of-multiple-connections
      

      An example of a full stack trace:

      2024-11-29 13:30:26,009+0000 Thread-7250 WARN anonymous     [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections. Refer to Knowledge Base: https://go.atlassian.com/dangerous-use-of-multiple-connections
      java.lang.AssertionError: Explicit stack trace requested
              at com.atlassian.jira.util.log.RateLimitingLogger.warnWithTrace(RateLimitingLogger.java:149)
              at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor$CountHolder.logWarn(ConnectionPoolHealthSqlInterceptor.java:236)
              at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor$CountHolder.taken(ConnectionPoolHealthSqlInterceptor.java:250)
              at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor.onConnectionTaken(ConnectionPoolHealthSqlInterceptor.java:89)
              at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.lambda$onConnectionTaken$0(ChainedSQLInterceptor.java:64)
              at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.forEach(ChainedSQLInterceptor.java:93)
              at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.onConnectionTaken(ChainedSQLInterceptor.java:63)
              at org.ofbiz.core.entity.jdbc.interceptors.connection.SafeDelegatingSqlConnectionInterceptor.onConnectionTaken(SafeDelegatingSqlConnectionInterceptor.java:30)
              at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.informInterceptor(ConnectionTracker.java:64)
              at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker.trackConnection(ConnectionTracker.java:49)
              at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.trackConnection(DBCPConnectionFactory.java:284)
              at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:81)
              at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69)
              at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:174)
              at com.atlassian.jira.ofbiz.sql.TransactionFactoryInterfaceWrapper.getConnection(TransactionFactoryInterfaceWrapper.java:41)
              at com.atlassian.jira.ofbiz.sql.JiraSupportedDatabasesCompatibleJNDIFactory.getConnection(JiraSupportedDatabasesCompatibleJNDIFactory.java:27)
              at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:114)
              at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
              at com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory.getConnection(DefaultOfBizConnectionFactory.java:33)
              at com.atlassian.jira.database.DatabaseAccessorImpl.borrowConnection(DatabaseAccessorImpl.java:168)
              at com.atlassian.jira.database.DatabaseAccessorImpl.executeQuery(DatabaseAccessorImpl.java:75)
              at com.atlassian.jira.database.DefaultQueryDslAccessor$1.executeQuery(DefaultQueryDslAccessor.java:79)
              at com.atlassian.jira.config.properties.v2.OfBizPropertySetApplicationPropertiesDao.query(OfBizPropertySetApplicationPropertiesDao.java:361)
              at com.atlassian.jira.config.properties.v2.OfBizPropertySetApplicationPropertiesDao.find(OfBizPropertySetApplicationPropertiesDao.java:130)
              at com.atlassian.jira.config.properties.v2.DefaultApplicationPropertiesManager.get(DefaultApplicationPropertiesManager.java:40)
              at com.atlassian.jira.config.properties.v2.DefaultCachingApplicationPropertiesManager.loadApplicationProperty(DefaultCachingApplicationPropertiesManager.java:170)
              at com.atlassian.cache.ehcache.wrapper.ValueProcessorAtlassianCacheLoaderDecorator.load(ValueProcessorAtlassianCacheLoaderDecorator.java:26)
              at com.atlassian.cache.ehcache.LoadingCache.getFromLoader(LoadingCache.java:172)
              at com.atlassian.cache.ehcache.SynchronizedLoadingCacheDecorator.synchronizedLoad(SynchronizedLoadingCacheDecorator.java:29)
              at com.atlassian.cache.ehcache.LoadingCache.loadValueAndReleaseLock(LoadingCache.java:140)
              at com.atlassian.cache.ehcache.LoadingCache.get(LoadingCache.java:119)
              at com.atlassian.cache.ehcache.DelegatingCache.get(DelegatingCache.java:109)
              at com.atlassian.cache.impl.metrics.InstrumentedCache.get(InstrumentedCache.java:72)
              at com.atlassian.jira.cache.stats.CacheWithStats.get(CacheWithStats.java:46)
              at com.atlassian.jira.config.properties.v2.DefaultCachingApplicationPropertiesManager.get(DefaultCachingApplicationPropertiesManager.java:93)
              at com.atlassian.jira.config.properties.v2.ApplicationPropertiesBackedPropertySet.get(ApplicationPropertiesBackedPropertySet.java:41)
              at com.opensymphony.module.propertyset.AbstractPropertySet.getString(AbstractPropertySet.java:305)
              at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getStringFromDb(ApplicationPropertiesStore.java:251)
              at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getString(ApplicationPropertiesStore.java:314)
              at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getDefaultBackedString(ApplicationPropertiesImpl.java:70)
              at jdk.internal.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:569)
              at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
              at jdk.proxy3/jdk.proxy3.$Proxy758.getDefaultBackedString(Unknown Source)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:569)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
              at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)
              at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:241)
              at jdk.proxy411/jdk.proxy411.$Proxy8253.getDefaultBackedString(Unknown Source)
              at com.atlassian.jira.config.properties.PropertiesUtil.getIntProperty(PropertiesUtil.java:23)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.lucene.index.CannedResponseMultiThreadedIndexingConfigurationFactory$PropertiesAdapter.minimumBatchSize(CannedResponseMultiThreadedIndexingConfigurationFactory.java:37)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.lucene.index.CannedResponseIndexerImpl.getIndexingStrategy(CannedResponseIndexerImpl.java:296)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.lucene.index.CannedResponseIndexerImpl.reindexAll(CannedResponseIndexerImpl.java:153)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexManagerImpl.lambda$reindexAll$5(CannedResponseIndexManagerImpl.java:276)
              at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.lambda$execute$0(DatabaseAccessorImpl.java:69)
              at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:109)
              at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.lambda$execute$0(DefaultTransactionalExecutor.java:64)
              at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.lambda$borrowConnectionAndExecute$0(JiraHostConnectionAccessor.java:95)
              at com.atlassian.jira.database.DatabaseAccessorImpl.executeQuery(DatabaseAccessorImpl.java:77)
              at jdk.internal.reflect.GeneratedMethodAccessor247.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:569)
              at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
              at jdk.proxy3/jdk.proxy3.$Proxy329.executeQuery(Unknown Source)
              at jdk.internal.reflect.GeneratedMethodAccessor247.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:569)
              at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:130)
              at jdk.proxy3/jdk.proxy3.$Proxy329.executeQuery(Unknown Source)
              at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.borrowConnectionAndExecute(JiraHostConnectionAccessor.java:84)
              at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.execute(JiraHostConnectionAccessor.java:48)
              at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:61)
              at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:67)
              at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInNewTransaction(DatabaseAccessorImpl.java:38)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexManagerImpl.reindexAll(CannedResponseIndexManagerImpl.java:264)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexLauncherImpl.lambda$reindexAllUnsafe$3(CannedResponseIndexLauncherImpl.java:159)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.utils.FunctionalDatabaseTransactionHelper.lambda$runInManagedTransaction$0(FunctionalDatabaseTransactionHelper.java:59)
              at com.atlassian.pocketknife.internal.querydsl.EitherAwareDatabaseAccessorImpl.lambda$runInEitherAwareTransaction$3(EitherAwareDatabaseAccessorImpl.java:58)
              at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.lambda$execute$0(DatabaseAccessorImpl.java:69)
              at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:109)
              at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.lambda$execute$0(DefaultTransactionalExecutor.java:64)
              at com.atlassian.jira.database.DatabaseAccessorImpl.runInManagedTransaction(DatabaseAccessorImpl.java:134)
              at jdk.internal.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:569)
              at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
              at jdk.proxy3/jdk.proxy3.$Proxy329.runInManagedTransaction(Unknown Source)
              at jdk.internal.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:569)
              at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:130)
              at jdk.proxy3/jdk.proxy3.$Proxy329.runInManagedTransaction(Unknown Source)
              at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.runInStartedOrExistingTransaction(JiraHostConnectionAccessor.java:130)
              at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.execute(JiraHostConnectionAccessor.java:60)
              at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:61)
              at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:67)
              at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInTransaction(DatabaseAccessorImpl.java:43)
              at com.atlassian.pocketknife.internal.querydsl.EitherAwareDatabaseAccessorImpl.runInEitherAwareTransaction(EitherAwareDatabaseAccessorImpl.java:57)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.utils.FunctionalDatabaseTransactionHelper.runInManagedTransaction(FunctionalDatabaseTransactionHelper.java:58)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexLauncherImpl.lambda$reindexAllUnsafe$4(CannedResponseIndexLauncherImpl.java:158)
              at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:953)
              at io.atlassian.fugue.Either.flatMap(Either.java:231)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexLauncherImpl.reindexAllUnsafe(CannedResponseIndexLauncherImpl.java:155)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexLauncherImpl.lambda$reindexAll$2(CannedResponseIndexLauncherImpl.java:134)
              at com.atlassian.jira.util.thread.JiraThreadLocalUtils.lambda$wrap$1(JiraThreadLocalUtils.java:156)
              at com.atlassian.ozymandias.SafePluginPointAccess.runnable(SafePluginPointAccess.java:404)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexLauncherImpl.safeRun(CannedResponseIndexLauncherImpl.java:200)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexLauncherImpl.reindexAll(CannedResponseIndexLauncherImpl.java:133)
              at com.atlassian.servicedesk.plugins.cannedresponses.internal.index.CannedResponseIndexLauncherImpl.lambda$reindexAllAsync$5(CannedResponseIndexLauncherImpl.java:184)
              at com.atlassian.jira.util.thread.JiraThreadLocalUtils.lambda$wrap$1(JiraThreadLocalUtils.java:156)
              at com.atlassian.jira.util.thread.OffRequestThreadExecutorImpl.execute(OffRequestThreadExecutorImpl.java:30)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:569)
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              klopacinski Karol Lopacinski
              szarazinski Sławomir Zaraziński
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: