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

Administrative Monitor causes slow page loading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline-maven-plugin
    • None
    • Jenkins 2.204.2
      Pipeline Maven 3.7.1

      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

            Unassigned Unassigned
            owenmehegan Owen Mehegan
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: