JBoss slow to start with long jandex indexing times for large applications

Solution Verified - Updated -

Issue

  • We have large applications deployed on EAP 7. We've seen that its start up time and heap required during start up has increased moving to EAP 7.3.1+ and again moving to 7.4.6+. When the app first begins its start up, the log stays silent for many minutes. During that time, CPU remains high on a single core from a single thread and thread dumps in that time show continual jandex indexing:
"MSC service thread 1-7" #22 prio=5 os_prio=0 cpu=1622528.18ms elapsed=1799.27s tid=0x0000000003561800 nid=0x9a0d runnable  [0x00007efda0380000]
   java.lang.Thread.State: RUNNABLE
    at org.jboss.jandex.StrongInternPool.eq(StrongInternPool.java:139)
    at org.jboss.jandex.StrongInternPool.intern(StrongInternPool.java:246)
    at org.jboss.jandex.NameTable.intern(NameTable.java:109)
    at org.jboss.jandex.ClassInfo.setMethods(ClassInfo.java:781)
    at org.jboss.jandex.Indexer.index(Indexer.java:1992)
    at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
    at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
    - locked <0x00000004054bcef8> (a org.jboss.as.server.deployment.DeploymentUnitPhaseService)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
    at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(java.base@11.0.5/Thread.java:834)

Environment

  • JBoss Enterprise Application Platform (EAP) 7.4.6+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content