JBoss becomes unresponsive with threads blocking on org.apache.log4j.spi.RootLogger

Solution Verified - Updated -

Issue

  • JBoss becomes slow/unresponsive with many threads blocking on org.apache.log4j.spi.RootLogger like so:

    "ajp-127.0.0.1-8009-1" daemon prio=10 tid=0x0000000062320800 nid=0x3b40 waiting for monitor entry [0x0000000045f89000]
       java.lang.Thread.State: BLOCKED (on object monitor)
        at org.apache.log4j.Category.callAppenders(Category.java:201)
        - locked <0x0000000771a28f70> (a org.apache.log4j.spi.RootLogger)
        at org.apache.log4j.Category.forcedLog(Category.java:388)
        at org.apache.log4j.Category.log(Category.java:853)
        at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:257)
    
  • Threads may also lock org.apache.log4j.Logger, as seen below:

"ajp-127.0.0.1-8080-36" daemon prio=3 tid=0x0c320400 nid=0xed waiting for monitor entry [0x55349000]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.log4j.Category.callAppenders(Category.java:201)
    - waiting to lock <0x8f07d578> (a org.apache.log4j.Logger)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.debug(Category.java:257)

Environment

  • JBoss Enterprise Application Platform (EAP)

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.