You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a million dollar question - what releases an object from RingBuffer after it was handled by the appender? That is what nulls the entry in the ring buffer after we done with it?
I have a very bad feeling that it is not done so all these objects keep hanging in the memory until the current item pointer wraps and starts overwriting old items. Quick look at heap dumps confirms that but we did not dig deeper.
It it is the case, it can be really a catastrophic thing for any application. LogEntry objects can be HUGE as they contain not just a text message but also stack traces and all the parameters passed to log.debug() or log.warn(). And 3rd party libs can pass anything they like there expecting that toString() will be invoked on it. For example Hector (Cassandra client) passes entire connection object there so if that object sits in the ring buffer for a long time it prevents a significant amount of memory (megabytes) from being collected by GC.
The text was updated successfully, but these errors were encountered:
Nice find. Yes, references were being kept around until they were overwritten the next time around. I've fixed this for version 4.4, to be released soon.
I have a million dollar question - what releases an object from RingBuffer after it was handled by the appender? That is what nulls the entry in the ring buffer after we done with it?
I have a very bad feeling that it is not done so all these objects keep hanging in the memory until the current item pointer wraps and starts overwriting old items. Quick look at heap dumps confirms that but we did not dig deeper.
It it is the case, it can be really a catastrophic thing for any application. LogEntry objects can be HUGE as they contain not just a text message but also stack traces and all the parameters passed to log.debug() or log.warn(). And 3rd party libs can pass anything they like there expecting that toString() will be invoked on it. For example Hector (Cassandra client) passes entire connection object there so if that object sits in the ring buffer for a long time it prevents a significant amount of memory (megabytes) from being collected by GC.
The text was updated successfully, but these errors were encountered: