ci: raise the open-file limit for mongod in the agent integration job
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m13s
CI / Check (pull_request) Successful in 18m36s

The first run of the job lost mongod mid-run again: its log says "Too
many open files" (WiredTiger fatal assertion). Every test opens its own
database, so WiredTiger keeps a file open per collection and index, and
job containers start with a soft limit of 1024. Reproduced locally with
--ulimit nofile=1024:524288 (19 of 87 failed); with 64000, all 87 pass.
That also explains the lost mongo service containers in #584.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-11-02 22:08:03 +01:00
1 parent 9e0836b28c
commit a5e9913957
1 file changed
+7 -5
+7 -5
View File
@@ -152,11 +152,11 @@ jobs:
if: always()
# compliance-agent's integration tests (compliance-agent/tests) need MongoDB.
# mongod runs as a process inside this job container, not as a `services:`
# container: three tries with a mongo service lost the database mid-run
# (pruefwerk #584), while the same tests against a mongo capped like a job
# (3 GB, 2 CPUs) pass locally and peak at ~0.5 GB. A process here can't be
# removed by the runner, and its log is printed when a test fails.
# Every test opens its own database, so WiredTiger keeps a file open per
# collection and index: with the containers' default of 1024 open files
# mongod aborts mid-run ("Too many open files"), which is what took the
# mongo service down in #584. mongod runs as a process in this job
# container with a raised limit, and its log is printed when a test fails.
agent-integration:
name: Agent integration
if: github.event_name == 'pull_request'
@@ -213,6 +213,8 @@ jobs:
echo "${MONGODB_SHA256} /tmp/mongodb.tgz" | sha256sum -c -
tar -xzf /tmp/mongodb.tgz -C /opt
mkdir -p /tmp/mongo-db
ulimit -n 64000 2>/dev/null || ulimit -n "$(ulimit -Hn)"
echo "open files: soft $(ulimit -Sn), hard $(ulimit -Hn)"
"/opt/${T}/bin/mongod" --dbpath /tmp/mongo-db --bind_ip 127.0.0.1 --port 27017 \
--wiredTigerCacheSizeGB 0.25 --fork --logpath /tmp/mongod.log
for i in $(seq 1 30); do