Skip to content

memory_limiter does not detect configured memory limits when enforcing container memory limig #12743

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

Open
gautam-nutalapati opened this issue Mar 26, 2025 · 0 comments

Comments

@gautam-nutalapati
Copy link

I am running otel collector as a sidecar in docker containers in EC2 backed ECS.
After setting a container memory limit as 100 MiB, memory_limiter keeps forcing a GC.
memory_limiter configuration is set to "limit_mib": 90 "spike_limit_mib": 75
Using percentage did not work either.

I want to use memory_limiter to limit my otel collector to some meaningful memory, I see in the past, it always used at most 50MiB memory.
Kindly let me know how to ensure memory_limiter detects configured memory limits.
Below are some logs from our otel colelctor which show GC triggered at much lower limit than what is configured.

ADOT Collector version: v0.43.1
Memory limiter configured {"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "limit_mib": 90, "spike_limit_mib": 75, "check_interval": 2}
Metric filter configured {"kind": "processor", "name": "filter/metrics", "pipeline": "metrics", "include match_type": "", "include expressions": [], "include metric names": [], "include metrics with resource attributes": null, "exclude match_type": "strict", "exclude expressions": [], "exclude metric names": ["http_client_duration"], "exclude metrics with resource attributes": null}
Starting aws-otel-collector... {"Version": "v0.43.1", "NumCPU": 2}

...

Memory usage is above soft limit. Forcing a GC. {"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "cur_mem_mib": 21}
Memory usage after GC. {"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "cur_mem_mib": 12}
Memory usage is above soft limit. Forcing a GC. {"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "cur_mem_mib": 25}
Memory usage after GC. {"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "cur_mem_mib": 14}
Memory usage is above soft limit. Forcing a GC. {"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "cur_mem_mib": 24}
Memory usage after GC. {"kind": "processor", "name": "memory_limiter", "pipeline": "traces", "cur_mem_mib": 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

No branches or pull requests

1 participant