Skip to content

Raise open file limit in jdk build images - #85

Merged
philipsens merged 1 commit into
masterfrom
copilot/increase-open-file-limit
Aug 19, 2026
Merged

Raise open file limit in jdk build images#85
philipsens merged 1 commit into
masterfrom
copilot/increase-open-file-limit

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Chrome crashes during CI browser tests because the containers inherit a low nofile limit. This raises the open file limit to 1048576 across all jdk build images (jdk8, jdk11, jdk17, jdk21, jdk25).

Changes

  • Dockerfiles: drop a /etc/security/limits.d/99-nofile.conf with soft/hard nofile of 1048576 for all users and root, and enable pam_limits.so in common-session so login/su sessions actually apply it.
RUN mkdir -p /etc/security/limits.d && \
    printf '* soft nofile 1048576\n* hard nofile 1048576\nroot soft nofile 1048576\nroot hard nofile 1048576\n' > /etc/security/limits.d/99-nofile.conf && \
    echo 'session required pam_limits.so' >> /etc/pam.d/common-session
  • docker-compose.yaml: add matching ulimits, since the container's limit is ultimately set by the daemon at start time — the in-image PAM config alone does not cover the main container process.
    ulimits:
      nofile:
        soft: 1048576
        hard: 1048576

Note that consumers running these images outside of the provided compose files will still need to pass --ulimit nofile=... themselves.

Co-authored-by: philipsens <12416423+philipsens@users.noreply.github.com>
@philipsens
philipsens marked this pull request as ready for review August 19, 2026 08:34
@philipsens
philipsens merged commit d9f3fed into master Aug 19, 2026
25 checks passed
@philipsens
philipsens deleted the copilot/increase-open-file-limit branch August 19, 2026 08:54
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

Successfully merging this pull request may close these issues.

2 participants