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

NonProductionGradeDatabaseWarningAdministrativeMonitor slowing down startup

    Details

    • Similar Issues:

      Description

      I noticed Jenkins being slow to start up, and saw this in a thread dump:

      "Handling GET /jenkins/ from ... View/index.jelly AdministrativeMonitorsDecorator/footer.jelly" ...
         java.lang.Thread.State: RUNNABLE
      	at org.h2.store.fs.FileMemData.<clinit>(FilePathMem.java:443)
      	at org.h2.store.fs.FilePathMem.<clinit>(FilePathMem.java:36)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:264)
      	at org.h2.store.fs.FilePath.registerDefaultProviders(FilePath.java:82)
      	at org.h2.store.fs.FilePath.get(FilePath.java:50)
      	at org.h2.store.fs.FileUtils.isAbsolute(FileUtils.java:102)
      	at org.h2.engine.ConnectionInfo.getName(ConnectionInfo.java:383)
      	at org.h2.engine.Engine.openSession(Engine.java:53)
      	at org.h2.engine.Engine.openSession(Engine.java:201)
      	- locked <0x...> (a org.h2.engine.Engine)
      	at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178)
      	at org.h2.engine.Engine.createSession(Engine.java:161)
      	at org.h2.engine.Engine.createSession(Engine.java:31)
      	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336)
      	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:169)
      	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:148)
      	at org.h2.Driver.connect(Driver.java:69)
      	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
      	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353)
      	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
      	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
      	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
      	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
      	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
      	at org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig.getDao(GlobalPipelineMavenConfig.java:340)
      	- locked <0x...> (a org.jenkinsci.plugins.pipeline.maven.GlobalPipelineMavenConfig)
      	at org.jenkinsci.plugins.pipeline.maven.NonProductionGradeDatabaseWarningAdministrativeMonitor.isActivated(NonProductionGradeDatabaseWarningAdministrativeMonitor.java:19)
      	at jenkins.model.Jenkins.lambda$getActiveAdministrativeMonitors$1(Jenkins.java:2214)
      	at jenkins.model.Jenkins$$Lambda$156/1109785585.test(Unknown Source)
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
      	at jenkins.model.Jenkins.getActiveAdministrativeMonitors(Jenkins.java:2219)
      	at jenkins.management.AdministrativeMonitorsDecorator.getActiveAdministrativeMonitors(AdministrativeMonitorsDecorator.java:77)
      	at jenkins.management.AdministrativeMonitorsDecorator.getActiveAdministrativeMonitorsCount(AdministrativeMonitorsDecorator.java:72)
      	at jenkins.management.AdministrativeMonitorsDecorator.shouldDisplay(AdministrativeMonitorsDecorator.java:131)
      	at ...
      

      We should not do such excessive class loading just to show an admin monitor. I think we can assume that in the common case where GlobalPipelineMavenConfig has never been configured, no one really cares that much about the database, and you should not expend any resources on it.

        Attachments

          Activity

          jglick Jesse Glick created issue -
          aheritier Arnaud Héritier made changes -
          Field Original Value New Value
          Assignee Alvaro Lobato [ alobato ]

            People

            • Assignee:
              Unassigned
              Reporter:
              jglick Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: