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.