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

OutOfMemory due to messages stored in memory - when no connection to Elastic. #16

Open
noban opened this issue Oct 1, 2015 · 7 comments

Comments

@noban
Copy link

noban commented Oct 1, 2015

OutOfMemory due to messages stored in memory - when no connection to Elastic. Basically we have encountered this situation. Is there any way to configure Stagemonitor not to store these messages, or at least set some limit to count of messages / size of the queue?

@felixbarny
Copy link
Member

What do you mean by messages? So your problem was that elasticsearch was unexpectedly down which lead to a OOM Error?

@noban
Copy link
Author

noban commented Oct 1, 2015

We're talking about large amount of FutureTask objects in StageMonitor's ThreadPoolExecutor that appeared in the heapdump. We've had a network problem that caused delivery to fail and as a result workQueue of this executor has consumed all the available memory.
histogram
objects-1

@felixbarny
Copy link
Member

I'm sorry for the issues. This should be easy to fix though. I'll probably limit the LinkedBlockingQueue of the Executor to hold max. 1000 Futures.
Thx for the detailed analysis

@noban
Copy link
Author

noban commented Oct 1, 2015

Great to hear, thank you in advance!

@kgusarov
Copy link

kgusarov commented Oct 1, 2015

@felixbarny It would be nice idea to introduce this limit in the configuration.

felixbarny pushed a commit to stagemonitor/stagemonitor that referenced this issue Oct 1, 2015
Prevents the queues to grow indefinitely.
See stagemonitor/stagemonitor-mailinglist#16
@felixbarny
Copy link
Member

I've just released a new version that contains the fix: https://github.com/stagemonitor/stagemonitor/releases/tag/0.18.0

@noban
Copy link
Author

noban commented Oct 1, 2015

Thank you for a really quick fix!

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

No branches or pull requests

3 participants