Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1116

Web app-friendly thread locals for gc-free logging (was: upgrade to log4j2 causes too frequent minor gc)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.3
    • None
    • Core
    • None
    • jdk1.6
      slf4j 1.7.9
      log4j2.3

    Description

      We used slf4j+log1.2 in our spring web application. Due to the log4j1.0 performance issue, we upgrade it to log4j2. When it goes to production, it experienced very frequent minor gc (once per second) even though the eden area is not full. For example, the eden area just occupied 10%, the minor gc also happens. The issue disappears when rolling back to log4j1.2.

      Can anyone show some hints on diagnose this issue? Thanks!

      Attachments

        1. Log4jThreadLocal.java
          3 kB
          Remko Popma
        2. Log4jThreadLocal.java
          3 kB
          Ralph Goers

        Issue Links

          Activity

            People

              rgoers Ralph Goers
              jewes Mingjiang Shi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: