JBoss EAP is slow to start

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x
    • 7.x
  • Red Hat JBoss Enterprise SOA Platform (SOA-P)

Issue

  • JBoss startup is slow.
  • JBoss is taking almost 2 minutes to boot the server in default configuration without any applications deployed.

Resolution

Root Cause

Diagnostic Steps

General
  • Review the JBoss boot.log and server.log and verify how long it takes for startup and if there are any associated errors or warnings.
  • Set JBoss logging to TRACE and compare the startup of an empty container to that with application(s) deployed.
  • Enable trace for the following category and check which aspect of the deployment is taking so long
       <category name="org.jboss.deployment">
         <priority value="TRACE" />
       </category>
Solaris / SunOS
  • Start JBoss with truss logging system calls to see what is happening at the system call level during the gaps in the JBoss logging. Edit run.sh as follows (line 285)

          # Execute the JVM in the foreground
          truss -dleaf -o truss.txt  "$JAVA" $JAVA_OPTS \
                   -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
                   -classpath "$JBOSS_CLASSPATH" \
                   org.jboss.Main "$@"
    
Linux
  • Start JBoss with strace logging system calls to see what is happening at the system call level during the gaps in the JBoss logging. Edit run.sh as follows:

          # Execute the JVM in the foreground
          strace -f -o strace.log "$JAVA" $JAVA_OPTS \
    
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.