Log4j 2
  1. Log4j 2
  2. LOG4J2-304

Async Loggers cause excessive memory usage and GC pauses

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta9
    • Component/s: Core
    • Labels:
      None

      Description

      Log events (or log event attributes) are put in the ring buffer, but are never removed. The ring buffer keeps a reference to these objects until it wraps around and the same slot is re-used for another log event.

      This means that:

      • the memory used by the log events cannot be GC-ed until the ring buffer wraps
      • by the time the ring buffer wraps, the objects almost certainly have been promoted to the old generation, where they may cause heap fragmentation resulting in long pauses when the GC compacts the heap.

      The solution is to clear the ring buffer references immediately after the log event has been fully processed.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        50s 1 Remko Popma 11/Jul/13 22:46
        In Progress In Progress Resolved Resolved
        16m 2s 1 Remko Popma 11/Jul/13 23:02
        Resolved Resolved Closed Closed
        1m 1 Remko Popma 11/Jul/13 23:03
        Remko Popma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Remko Popma made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Remko Popma added a comment -

        Fixed in revision 1502380.

        Show
        Remko Popma added a comment - Fixed in revision 1502380.
        Remko Popma made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Remko Popma created issue -

          People

          • Assignee:
            Remko Popma
            Reporter:
            Remko Popma
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development