GC overhead limit exceeded

I tried to build scala with command:
sbt dist/mkPack
But if failed with:
[error] java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded.

I am on windows 10.

Any workaround.

1 Like

Make sure your JAVA_OPTS are set so that the jvm has enough memory. For example, in my laptop I have (in Ubuntu)

export JAVA_OPTS="-Xms512m -Xmx4G"

In Windows, there are two places to set environment variables, one for the system and one for user specific variables.


1 Like