-
Notifications
You must be signed in to change notification settings - Fork 574
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
Memory leak when trying to read objects from the api at /v1/objects #10068
Comments
Hey, it happend to me too. It seems like icinga2 doesn't free the memory allocated when querying the API for objects. When it queries a lot of objects periodically the memory usage keeps increasing until the vm gets oom kill |
Hello and thank you for reporting! Would you try this PR if I build Icinga 2 for you? Best, |
Hi @ciantfv456, did you query all 40K services unfiltered? If so, did your client fully read the response before closing the connection? We have already identified a memory leak occurring when a large number of objects are queried and the client prematurely closes the stream, before fully reading the responses, which has been fixed by #10006 and will be released in the coming weeks. Nevertheless, we are also observing a situation where Icinga 2 is allocating a significant amount of memory, for example, due to excessive API usage and not returning it to the OS when it is no longer needed, but holding it back for later uses instead. In this case, using You can however replace the default Icinga 2 memory allocator by |
Thanks, @yhabteab. |
Describe the bug
We have a script that queries all of the services on icinga2 from the API.
The memory usage keeps increasing every time we access the /v1/objects route on the API.
To Reproduce
Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include configuration, logs, etc. to reproduce, if relevant.
Expected behavior
The memory that was allocated to the query should be set free after sending back the request
Your Environment
Include as many relevant details about the environment you experienced the problem in
icinga2 --version
): 2.14.0icinga2 feature list
): icingadb api checkerThe text was updated successfully, but these errors were encountered: