Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-3492

ConnectionPoolHealthSqlInterceptor logs dangerous use of multiple connections WARN messages when processing mail

      Summary

      The ConnectionPoolHealthSqlInterceptor logs dangerous use of multiple connections warnings for JIRA Service Desk mail processor

      Environment

      • JIRA Service Desk 3.1
      • Postgres 9.3, 9.4

      Steps to Reproduce

      1. Setup a Service Desk Mail Channel
      2. Wait for it to try to process the mail box to create tickets from email

      Expected Results

      There are no warnings about dangerous use of multiple connections.

      Actual Results

      It appears Service Desk mail processors is using multiple connections and WARN messages such as the following is thrown in the atlassian-jira.log file:

      2016-03-02 04:02:32,257 Caesium-2-2 WARN anonymous     [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: replaced => count=2; marks=[1-3]; pool=2/20
      java.lang.AssertionError: Explicit stack trace requested
      	at com.atlassian.jira.util.log.RateLimitingLogger.warnWithTrace(RateLimitingLogger.java:141)
      	at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor$CountHolder.logWarn(ConnectionPoolHealthSqlInterceptor.java:240)
      	at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor$CountHolder.replaced(ConnectionPoolHealthSqlInterceptor.java:269)
      	at com.atlassian.jira.ofbiz.ConnectionPoolHealthSqlInterceptor.onConnectionReplaced(ConnectionPoolHealthSqlInterceptor.java:98)
      	at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.lambda$onConnectionReplaced$712(ChainedSQLInterceptor.java:70)
      	at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.forEach(ChainedSQLInterceptor.java:93)
      	at com.atlassian.jira.ofbiz.ChainedSQLInterceptor.onConnectionReplaced(ChainedSQLInterceptor.java:69)
      	at org.ofbiz.core.entity.jdbc.interceptors.connection.SafeDelegatingSqlConnectionInterceptor.onConnectionReplaced(SafeDelegatingSqlConnectionInterceptor.java:47)
      	at org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionTracker$DelegatingConnectionImpl.close(ConnectionTracker.java:99)
      	at com.atlassian.pocketknife.spi.querydsl.AbstractConnectionProvider.returnConnection(AbstractConnectionProvider.java:79)
      	at com.atlassian.pocketknife.internal.querydsl.QueryFactoryImpl.fetch(QueryFactoryImpl.java:79)
      	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper.get(QueryDslHelper.java:322)
      	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper.getById(QueryDslHelper.java:290)
      	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper$1.apply(QueryDslHelper.java:214)
      	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper$1.apply(QueryDslHelper.java:173)
      	at com.atlassian.pocketknife.internal.querydsl.QueryFactoryImpl.insert(QueryFactoryImpl.java:189)
      	at com.atlassian.jira.internal.mail.processor.querydsl.QueryDslHelper.create(QueryDslHelper.java:173)
      	at com.atlassian.jira.internal.mail.processor.feature.audit.mailitem.MailItemAuditStore.createMailItemAudit(MailItemAuditStore.java:99)
      	at com.atlassian.jira.internal.mail.processor.feature.audit.mailitem.MailItemAuditManager.saveMailItemAudit(MailItemAuditManager.java:43)
      	at com.atlassian.jira.internal.mail.processor.feature.processor.MailHandlerWorker.saveAuditLog(MailHandlerWorker.java:117)
      	at com.atlassian.jira.internal.mail.processor.feature.processor.MailHandlerWorker.handle(MailHandlerWorker.java:79)
      	at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorWorker.processMailItem(MailProcessorWorker.java:129)
      	at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorWorker.process(MailProcessorWorker.java:76)
      	at com.atlassian.jira.internal.mail.processor.feature.processor.MailProcessorService.run(MailProcessorService.java:36)
      	at com.atlassian.jira.internal.mail.processor.services.MailProcessorExecutor.run(MailProcessorExecutor.java:30)
      	at com.atlassian.jira.internal.mail.processor.services.AbstractMailExecutor.execute(AbstractMailExecutor.java:42)
      	at com.atlassian.jira.internal.mail.processor.services.MailJobRunner.runJob(MailJobRunner.java:35)
      	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153)
      	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118)
      	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:401)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:396)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:349)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:255)
      	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:252)
      	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65)
      	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59)
      	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34)
      	at java.lang.Thread.run(Thread.java:745)
      

      Workaround

      No known workaround as yet

            [JSDSERVER-3492] ConnectionPoolHealthSqlInterceptor logs dangerous use of multiple connections WARN messages when processing mail

            aheinzer takindele Running JSD 3.11.2 I'm seeing these warnings each time mail is processed in multiple service desk projects. Even with a new service desk project. Possible regression?
            postgres 9.4

            Matthew Dell added a comment - aheinzer takindele Running JSD 3.11.2 I'm seeing these warnings each time mail is processed in multiple service desk projects. Even with a new service desk project. Possible regression? postgres 9.4
            Owen made changes -
            Workflow Original: JSD Bug Workflow v5 - TEMP [ 2304663 ] New: JAC Bug Workflow v3 [ 3126096 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 [ 2058558 ] New: JSD Bug Workflow v5 - TEMP [ 2304663 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 - TEMP [ 2055973 ] New: JSD Bug Workflow v5 [ 2058558 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v5 [ 1956007 ] New: JSD Bug Workflow v5 - TEMP [ 2055973 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Bug Workflow v4 [ 1614766 ] New: JSD Bug Workflow v5 [ 1956007 ]

            S Stack added a comment -

            Clue for JIRA non-Service Desk

            Just realized an important clue.
            We start up our test instance with the following setting from setenv.sh:

            DISABLE_NOTIFICATIONS=" -Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true -Datlassian.mail.popdisabled=true"

            So in our test instance, this message appears to be log noise.

            Full log text:

            2017-03-28 16:16:58,467 ClusterMessageHandlerServiceThread:thread-1 WARN      [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: taken => count=2; marks=[1-0]; pool=30/30

            S Stack added a comment - Clue for JIRA non-Service Desk Just realized an important clue. We start up our test instance with the following setting from setenv.sh : DISABLE_NOTIFICATIONS=" -Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true -Datlassian.mail.popdisabled=true" So in our test instance, this message appears to be log noise. Full log text: 2017-03-28 16:16:58,467 ClusterMessageHandlerServiceThread:thread-1 WARN      [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: taken => count=2; marks=[1-0]; pool=30/30

            S Stack added a comment -

            JIRA Data Center 7.2.7 with Postgres

            We also see this error in a test instance and we do not run JIRA Service Desk.

            S Stack added a comment - JIRA Data Center 7.2.7 with Postgres We also see this error in a test instance and we do not run JIRA Service Desk.
            Confluence Escalation Bot (Inactive) made changes -
            Labels New: affects-server

            Oh in fact we having this error in JIRA not Service Desk.

            Zeeshan Malik added a comment - Oh in fact we having this error in JIRA not Service Desk.

              Unassigned Unassigned
              takindele Taiwo Akindele (Inactive)
              Affected customers:
              16 This affects my team
              Watchers:
              32 Start watching this issue

                Created:
                Updated:
                Resolved: