JBoss is slow to start when hosting large amounts of static content or large jars with many files and packages

Solution Verified - Updated -

Issue

  • JBoss is very slow to start when hosting large amounts of static content or large jars with many packages
  • The logging during this time shows only the following types of "Indexed pkg" TRACE messages:

    
    TRACE [org.jboss.mx.loading.ClassLoaderUtils] Indexed pkg: ROOT.war.images, UCL: org.jboss.mx.loading.UnifiedClassLoader3@1ed54a0{ url=file:/path/to/jboss-as/server/default/deploy/jboss-web.deployer/ ,addedOrder=6}
    
  • The thread dumps show the main thread continuously hitting the filesystem during this time:
    
    "main" prio=1 tid=0x081481b8 nid=0x7f74 runnable [0x301ca000..0x301ccfa0]
         at java.io.UnixFileSystem.list(Native Method)
         at java.io.File.list(File.java:937)
         at java.io.File.listFiles(File.java:1093)
         at org.jboss.mx.loading.ClassLoaderUtils$FileIterator.getNextEntry(ClassLoaderUtils.java:501)
         at org.jboss.mx.loading.ClassLoaderUtils$ClassPathIterator.getNextEntry(ClassLoaderUtils.java:618)
         at org.jboss.mx.loading.ClassLoaderUtils.updatePackageMap(ClassLoaderUtils.java:320)
         at org.jboss.mx.loading.ClassLoaderUtils.updatePackageMap(ClassLoaderUtils.java:254)
         at org.jboss.mx.loading.UnifiedLoaderRepository3.updatePackageMap(UnifiedLoaderRepository3.java:813)
    

Environment

  • JBoss Enterprise Application Platform (EAP) 4.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.