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

Increase default queue size for AsyncAppender

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9.0
    • 2.9.1
    • Appenders
    • 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

              rpopma Remko Popma
              rpopma Remko Popma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: