Skip to content

Commit

Permalink
Increase gradle memory pool size from 4gb to 12gb, crash on OOM (#3254)
Browse files Browse the repository at this point in the history
* Increase xmx from 4gb to 8gb, crash on OOM

* add debug logging for the build job

* disable maxparallelforks

* Update gradle.properties

* Update gradle.properties

* Update build.gradle.kts

---------

Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
  • Loading branch information
markushi and romtsn authored Mar 11, 2024
1 parent f5e1b97 commit 28c9a83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ allprojects {
TestLogEvent.PASSED,
TestLogEvent.FAILED
)
maxParallelForks = Runtime.getRuntime().availableProcessors() / 2
maxParallelForks = Runtime.getRuntime().availableProcessors() / 4

// Cap JVM args per test
minHeapSize = "128m"
maxHeapSize = "1g"
minHeapSize = "256m"
maxHeapSize = "2g"
dependsOn("cleanTest")
}
withType<JavaCompile> {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Daemons heap size
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1536m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC
org.gradle.jvmargs=-Xmx12g -XX:MaxMetaspaceSize=4g -XX:+CrashOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC
org.gradle.caching=true
org.gradle.parallel=true

Expand Down

0 comments on commit 28c9a83

Please sign in to comment.