-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set MaxMetaspace for Stratego to build
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# In Java 8 and earlier, the metaspace is part of the heap size. In newer Java versions, the metaspace size is | ||
# set to unlimited, reducing the occurrence of OutOfMemoryError: Metaspace. However, by default the Gradle daemon | ||
# runs with a MaxMetaspaceSize of 384 MB (see in this Gradle 8 commit: https://github.com/gradle/gradle/blob/80477c69ff426af47b53cda7f3167ad188935727/platforms/core-runtime/client-services/src/main/java/org/gradle/launcher/daemon/configuration/DaemonParameters.java#L52) | ||
# We set the MaxMetaspaceSize to unlimited to avoid the following error: | ||
# Analysis failed unexpectedly | ||
# org.metaborg.core.analysis.AnalysisException: Failed to get Stratego runtime\ | ||
# Caused by: org.metaborg.core.MetaborgException: Failed to load JAR | ||
# Caused by: org.strategoxt.IncompatibleJarException: Incompatible Stratego jar: file:stratego.jar (Metaspace) | ||
# Caused by: java.lang.OutOfMemoryError: Metaspace | ||
# | ||
# Expiring Daemon because JVM heap space is exhausted | ||
# Expiring Daemon because JVM heap space is exhausted | ||
# Daemon is stopping immediately JVM garbage collector thrashing and after running out of JVM memory and after running out of JVM memory | ||
org.gradle.jvmargs=-Xss16M -Xms512M -Xmx2G -XX:MaxMetaspaceSize=unlimited | ||
|