Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate disruptors for encoder and network communications #188

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

bedrin
Copy link

@bedrin bedrin commented Oct 23, 2016

If all destination servers are unavailable the log events fill the ring buffer. Usually it is not an issue, but if you use LogstashAccessTcpSocketAppender the memory footprint might be quite significant.
In my project I'm using Spring MVC which stores a lot of data in HttpServletRequest attributes - this map is copied to AccessEvent istances. In my case the ring buffer with default size occupied about 600Mb of heap and caused OOM on my test environment

I believe that log appender should never cause OOM under any circumstances.

I suggest introducing a separate Disruptor for encoding the log events, so even in case of unreachable destination heap would not be occupied with strongly reachable big AccessEvent objects:

Event -> RingBuffer -> Encoder -> RingBuffer -> TcpAppender

@brenuart brenuart force-pushed the main branch 3 times, most recently from 8e7c02d to 926c65a Compare October 28, 2021 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant