Skip to content

Commit f83aadb

Browse files
celicooclaude
andcommitted
fix: Reduce TEST_CONCURRENCY from 8 to 4 to prevent OOM kills
Each Next.js test spawns a dev/prod server with webpack compilation, using ~1-2 GB RAM per server. With TEST_CONCURRENCY=8 and 4-core runners (16 GB RAM), 8 concurrent servers could use 8-16+ GB RAM, triggering the Linux OOM killer and causing tests to be "killed". Reducing to 4 concurrent tests (matching core count) should keep memory usage within bounds while still utilizing available parallelism. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0712a16 commit f83aadb

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/build_reusable.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@ env:
5252
TURBO_VERSION: 2.5.5
5353
NODE_LTS_VERSION: 20.9.0
5454
# run-tests.js reads `TEST_CONCURRENCY` if no explicit `--concurrency` or `-c`
55-
# argument is provided
56-
TEST_CONCURRENCY: 8
55+
# argument is provided.
56+
# NOTE: Each Next.js test spawns a dev/prod server with webpack compilation,
57+
# using ~1-2 GB RAM per server. 4-core runners have 16 GB RAM, so we limit to
58+
# 4 concurrent tests to prevent OOM (Out of Memory) kills.
59+
TEST_CONCURRENCY: 4
5760

5861
NEXT_TELEMETRY_DISABLED: 1
5962
NEXT_JUNIT_TEST_REPORT: 'true'

.github/workflows/build_reusable_bun.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ on:
4242

4343
env:
4444
# run-tests.js reads `TEST_CONCURRENCY` if no explicit `--concurrency` or `-c`
45-
# argument is provided
46-
TEST_CONCURRENCY: 8
45+
# argument is provided.
46+
# NOTE: Each Next.js test spawns a dev/prod server with webpack compilation,
47+
# using ~1-2 GB RAM per server. 4-core runners have 16 GB RAM, so we limit to
48+
# 4 concurrent tests to prevent OOM (Out of Memory) kills.
49+
TEST_CONCURRENCY: 4
4750

4851
NEXT_TELEMETRY_DISABLED: 1
4952
NEXT_JUNIT_TEST_REPORT: 'true'

0 commit comments

Comments
 (0)