[RORDEV-1229] Make docker-compose resource limits opt-in and host-size aware - #101
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
coutoPL
force-pushed
the
change/RORDEV-1229_resource_limits
branch
from
July 29, 2026 15:35
7411198 to
c2a4e09
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Container memory limits were hardcoded in base.docker-compose.yml and apm.docker-compose.yml, so every environment got them whether it needed them or not. They are sized for small CI agents and are tight: es-ror capped at 2g against a 1g heap sits at 97–99% of its cgroup for a whole suite run, and one GC spike OOM-kills it. There is no restart policy, so the container stays dead and every remaining spec fails.
This moves mem_limit/memswap_limit out into base.limits.docker-compose.yml and apm.limits.docker-compose.yml, applied as compose overlays only when asked for.
APPLY_RESOURCE_LIMITS accepts true, false or auto:
The ES heap is now pinned explicitly (-Xms1g -Xmx1g) so dropping the cgroup limit does not let it grow unbounded.
Also raises the kbn-ror healthcheck start_period from 60s to 180s: two Kibana replicas boot alongside ES and APM, and on CPU-small agents a replica needs more than 60s to answer /api/status, which was causing docker compose up --wait to tear the stack down before the tests started.
No change for eck environments — they do not use docker-compose overlays.