Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
1.98k stars 571 forks source link

Memory leak when trying to read objects from the api at /v1/objects #10068

Open ciantfv456 opened 1 month ago

ciantfv456 commented 1 month ago

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.

  1. Run icinga2 2.14 on container
  2. Create 40000 services
  3. Query the API at /v1/objects multiple times
  4. See the memory increasing

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

Jamess11 commented 1 month ago

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