Elastic/Kibana Excessive Memory Consumption in Docker Causes Tasks to Hang and OOM Kills

Kibana version:
9.5.0

Elasticsearch version:
9.5.0
Server OS version:
24.04.3 LTS (Noble Numbat)

Original install method (e.g. download page, yum, from source, etc.):
Docker
Describe the bug:
Kibana is consuming an unexpectedly high amount of memory when running in a Docker environment. Over time, Kibana's memory usage continues to increase, causing tasks to become stuck or remain incomplete.

As memory consumption reaches the available system/container limit, the server eventually triggers an Out-Of-Memory (OOM) condition and kills the Kibana process/container. This results in interrupted or stuck tasks and makes Kibana unavailable until the service is restarted.

The issue appears to be related to excessive or continuously increasing memory consumption by Kibana in the Docker environment
Steps to reproduce:

  1. Deploy Kibana in a Docker environment with the configured memory limits.
  2. Run Kibana and perform the required tasks/workload for an extended period.
  3. Monitor Kibana/container memory usage and observe that memory consumption progressively increases.
  4. Once available memory is exhausted, observe that tasks become stuck and the server/container experiences an OOM kill.

Expected behavior:
Kibana should manage memory efficiently and release memory when it is no longer required. Memory consumption should remain within the configured Docker/container limits, and tasks should continue to execute without becoming stuck.

Kibana should not cause the server or container to reach an OOM condition under the expected workload.
Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):
Please refer the sceenshots
Any additional context:

  1. Kibana is running in a Docker environment.
  2. Memory consumption appears to increase significantly over time.
  3. Tasks become stuck when available memory becomes low.
  4. The server eventually performs an OOM kill due to memory exhaustion.
  5. Further investigation is required to determine whether the issue is caused by a Kibana memory leak, a specific workload/task, or insufficient Docker memory allocation.