Skip to content

test(mongo): raise container nofile limit; tolerate neighbor noise in pool test#245

Closed
angela-helios wants to merge 1 commit into
mainfrom
fix/ci-mongo-nofile-ulimit
Closed

test(mongo): raise container nofile limit; tolerate neighbor noise in pool test#245
angela-helios wants to merge 1 commit into
mainfrom
fix/ci-mongo-nofile-ulimit

Conversation

@angela-helios

Copy link
Copy Markdown
Contributor

Two stability fixes for the shared-container MongoDB integration suite, each observed as a real one-off failure:

  1. TooManyFilesOpen (error 264) in the coverage job (seen on #230's runmongodb_integration_settings_optimistic_lock died during an index build). Every test creates its own uniquely-named database, and WiredTiger keeps file handles open per collection/index across all of them — 50+ test databases exhaust the stock container nofile limit late in the run. The shared testcontainer now starts with --ulimit nofile=64000 (mongod's own recommended minimum). Same tuning spot as the earlier WiredTiger cache cap.

  2. mongodb_integration_reuses_client_pool_under_concurrent_read_search flaking on wide runners. It asserts on serverStatus.connections.totalCreated, a server-global counter on the shared mongo, so concurrently running neighbor tests (each with its own client pool) inflate it past the old ceiling of 50. The regression it guards against — a fresh client per operation — creates ≥160 connections (8 tasks × 20 ops), so a 120 ceiling keeps the signal while tolerating the noise.

Full suite green locally against the ulimit-configured container: 51/51.

Note for in-flight PRs (#229/#230/#241/#242/#244): the coverage job runs each branch's own tree, so they'll want a main merge after this lands to pick the fix up.

… pool test

Two stability fixes for the shared-container MongoDB suite, both
observed as one-off failures on real runs:

- The coverage job died with TooManyFilesOpen (error 264) during an
  index build: every test creates its own uniquely-named database and
  WiredTiger keeps file handles open per collection/index across all
  of them, so 50+ test databases exhaust the stock container nofile
  limit late in the run. Start the shared container with
  ulimit nofile=64000 (mongod own recommended minimum).

- mongodb_integration_reuses_client_pool_under_concurrent_read_search
  asserts on serverStatus totalCreated, a server-global counter on the
  shared mongo, so concurrently running neighbor tests inflate it past
  the old 50 ceiling on wide runners. The regression it guards against
  (a fresh client per operation) creates at least 160 connections
  (8 tasks x 20 ops); raise the ceiling to 120 to keep that detectable
  while tolerating neighbor noise.
@angela-helios

Copy link
Copy Markdown
Contributor Author

Closing: per review feedback this fix rides directly on the failing PR (#230) instead of a separate PR.

@angela-helios
angela-helios deleted the fix/ci-mongo-nofile-ulimit branch July 10, 2026 06:23
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.

1 participant