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

          Form Name

            [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

            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.

            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.

            zeeshan.malik3 This reported bug was fixed in Service Desk 3.2.0.  You would need to upgrade your service desk to 3.2.0 or higher to fix this issue.

            Andy Heinzer added a comment - zeeshan.malik3 This reported bug was fixed in Service Desk 3.2.0.  You would need to upgrade your service desk to 3.2.0 or higher to fix this issue.

            We are experiencing same problem.

            Why this issue is closed without providing a workaround or fix?

            Zeeshan Malik added a comment - We are experiencing same problem. Why this issue is closed without providing a workaround or fix?

            Asten added a comment - - edited

            Same for me... the mail are read by IMAP (the are marked "read" on the mail server) but are not created in Jira SD.

            The only clue is a warn log :

            2016-10-24 09:13:46,394 Caesium-1-1 WARN ServiceRunner     [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: taken => count=3; marks=[2-3]; pool=3/20
            2016-10-24 09:13:46,396 Caesium-1-1 WARN ServiceRunner     [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: replaced => count=2; marks=[1-3]; pool=2/20
            2016-10-24 09:13:46,396 Caesium-1-1 WARN ServiceRunner     [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: replaced => count=1; marks=[0-3]; pool=1/20
            2016-10-24 09:13:46,397 Caesium-1-1 WARN ServiceRunner     [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: replaced => count=0; marks=[-1-3]; pool=0/20
            

            I'm on MySql ...

            Asten added a comment - - edited Same for me... the mail are read by IMAP (the are marked "read" on the mail server) but are not created in Jira SD. The only clue is a warn log : 2016-10-24 09:13:46,394 Caesium-1-1 WARN ServiceRunner [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: taken => count=3; marks=[2-3]; pool=3/20 2016-10-24 09:13:46,396 Caesium-1-1 WARN ServiceRunner [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: replaced => count=2; marks=[1-3]; pool=2/20 2016-10-24 09:13:46,396 Caesium-1-1 WARN ServiceRunner [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: replaced => count=1; marks=[0-3]; pool=1/20 2016-10-24 09:13:46,397 Caesium-1-1 WARN ServiceRunner [c.a.jira.ofbiz.ConnectionPoolHealthSqlInterceptor] Dangerous use of multiple connections: replaced => count=0; marks=[-1-3]; pool=0/20 I'm on MySql ...

            We are experiencing the same problem on our server and we had to restart JIRA in the middle of the day because of this issue.
            JSD 3.0.10 / JIRA Core 7.0.5 / JIRA Software 7.0.10

            Benjamin Ziegler added a comment - We are experiencing the same problem on our server and we had to restart JIRA in the middle of the day because of this issue. JSD 3.0.10 / JIRA Core 7.0.5 / JIRA Software 7.0.10

            Same trace on JSD 3.1.4 / JIRA Software 7.1.4 on Microsoft SQL Server 2012 (jDTS-1.3.1).

            Michel Pittelkow added a comment - Same trace on JSD 3.1.4 / JIRA Software 7.1.4 on Microsoft SQL Server 2012 (jDTS-1.3.1).

            Same stacktrace on servicedesk-3.1.4 / jira-7.1.4-x64 and Postgresql 9.3

            Krzysztof Mrozek added a comment - Same stacktrace on servicedesk-3.1.4 / jira-7.1.4-x64 and Postgresql 9.3

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

                Created:
                Updated:
                Resolved: