Skip to content

Commit a380a82

Browse files
authored
build: raise Gradle daemon heap to avoid intermittent CI OOM (Stirling-Tools#7151)
## Problem The `build (25, saas)` CI job intermittently fails with: ``` The Daemon will expire immediately since the JVM garbage collector is thrashing. The currently configured max heap space is '512 MiB' and the configured max metaspace is '384 MiB'. FAILURE: Build failed with an exception. * What went wrong: Gradle build daemon has been stopped: since the JVM garbage collector is thrashing ``` `gradle.properties` never set `org.gradle.jvmargs`, so the daemon runs on Gradle's 512 MiB default heap. The larger builds — the `saas` flavor in particular, which compiles core + proprietary + saas — exhaust it under `org.gradle.parallel=true`, and the daemon dies mid-build. It's flaky (passes on re-run), which makes it a recurring, noisy CI failure. ## Fix ```properties org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=1g ``` 2 GiB heap + 1 GiB metaspace gives comfortable headroom on GitHub-hosted runners and typical dev machines, well clear of the thrash point. One-line, repo-wide config change. ## Verification - `./gradlew help` starts the daemon cleanly with the new args (no malformed-arg failure). - The real signal is CI: this branch's `build (25, saas)` should stop OOM-ing. Split out from Stirling-Tools#7048 (Plan & Usage) since it's unrelated build infrastructure.
1 parent 3813ca3 commit a380a82

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

gradle.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Gradle daemon heap. The default (512 MiB) is exhausted by the larger builds
2+
# (notably the saas flavor) under parallel execution, causing intermittent
3+
# "JVM garbage collector is thrashing" daemon deaths in CI. 2 GiB heap + 1 GiB
4+
# metaspace gives comfortable headroom on CI runners and typical dev machines.
5+
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=1g
6+
17
# Enables parallel execution of tasks, allowing multiple tasks to run simultaneously
28
org.gradle.parallel=true
39

0 commit comments

Comments
 (0)