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

Increase default queue size for AsyncAppender

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.9.1
    • Component/s: Appenders
    • Labels:
      None

      Description

      LOG4J2-2031 highlighted that the default queue size (128) for AsyncAppender is extremely small compared to the async logger defaults.

      Even small event bursts will likely fill up the queue and cause messages to appear in the log file out of order. Until LOG4J2-2031 is fixed, a larger queue size will make this less likely to happen.

      Better recursion detection (see LOG4J2-2031) will fix the out-of-sequence messages. From that point, when the queue is full the logging call will block until a slot in the queue becomes available, so the only impact of a small queue is performance. From a performance perspective it is also desirable to have a default queue size of something like 1K slots to handle moderate-size bursts of events smoothly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                remkop@yahoo.com Remko Popma
                Reporter:
                remkop@yahoo.com Remko Popma
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: