Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63994

Administrative Monitor causes slow page loading

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: pipeline-maven-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.204.2
      Pipeline Maven 3.7.1
    • Similar Issues:

      Description

      One of our customers reported intermittent problems with slow page loading. Looking at the slow-request logs, we saw that the majority of them were caused by pages waiting for the Pipeline Maven Administrative Monitor to run:

       

      28389msec elapsed in Handling GET /jenkins/ from 10.11.106.101 : qtp1160264930-3530033 View/index.jelly AdministrativeMonitorsDecorator/footer.jelly
      
      sun.misc.Unsafe.park(Native Method)
      java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
      java.util.concurrent.SynchronousQueue$TransferQueue.awaitFulfill(SynchronousQueue.java:764)
      java.util.concurrent.SynchronousQueue$TransferQueue.transfer(SynchronousQueue.java:695)
      java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
      com.zaxxer.hikari.util.ConcurrentBag.borrow(ConcurrentBag.java:157)
      com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:179)
      com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:161)
      com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
      org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginH2Dao.isEnoughProductionGradeForTheWorkload(PipelineMavenPluginH2Dao.java:68)
      org.jenkinsci.plugins.pipeline.maven.dao.PipelineMavenPluginMonitoringDao.isEnoughProductionGradeForTheWorkload(PipelineMavenPluginMonitoringDao.java:261)
      org.jenkinsci.plugins.pipeline.maven.NonProductionGradeDatabaseWarningAdministrativeMonitor.isActivated(NonProductionGradeDatabaseWarningAdministrativeMonitor.java:19)
      

      We can see this on loading the main page, job pages, and even build log pages. The plugin has the default configuration, and actually is not being used by the customer, so this doesn't seem related to plugin config or number of jobs. The customer confirms that only administrative users experience the slow page loading, so that seems to confirm that the admin monitor is the issue.

      This admin monitor check runs some SQL queries against the default H2 in-memory database and raises a warning if there are too many entries in it, suggesting that they use an external DB instead. The results of this check should probably be cached, instead of running the full check on every page load.

      May be related to https://issues.jenkins-ci.org/browse/JENKINS-62358

        Attachments

          Issue Links

            Activity

            Hide
            ddewhurst Dylan Dewhurst added a comment -

            Workaround for this is to disable the Maven administrative monitor. I was able to do this by accessing the Configure System page of Jenkins directly hitting the http://JENKINS_URL/configure endpoint in the browser. Then you can disable: Administrative monitors configuration -> Pipeline Maven Integration - Non Production Database

             

            You could also try adding this to the config.xml and restarting. However it did not persist for me:

             

            <disabledAdministrativeMonitors>
            <string>org.jenkinsci.plugins.pipeline.maven.NonProductionGradeDatabaseWarningAdministrativeMonitor</string>
            </disabledAdministrativeMonitors>

            Show
            ddewhurst Dylan Dewhurst added a comment - Workaround for this is to disable the Maven administrative monitor. I was able to do this by accessing the Configure System page of Jenkins directly hitting the http://JENKINS_URL/configure  endpoint in the browser. Then you can disable: Administrative monitors configuration -> Pipeline Maven Integration - Non Production Database   You could also try adding this to the config.xml and restarting. However it did not persist for me:   <disabledAdministrativeMonitors> <string>org.jenkinsci.plugins.pipeline.maven.NonProductionGradeDatabaseWarningAdministrativeMonitor</string> </disabledAdministrativeMonitors>

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              owenmehegan Owen Mehegan
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: