The client may fail to handle large Scala/sbt projects resulting in an Out of Memory (OOM) error:
[error] (run-main-0) java.lang.OutOfMemoryError: GC overhead limit exceeded java.lang.OutOfMemoryError: GC overhead limit exceeded
If these errors appear while you are running a Snyk command, first take Snyk out of the mix and verify whether this is a Snyk problem or an sbt problem with the project itself.
Snyk builds the dependency tree for Scala projects using sbt and you can emulate this behavior by using the following command:
$ sbt "-Dsbt.log.noformat=true" dependencyTree
Whether or not this command also produces the error, you can attempt the resolution below.
Scala has several environment variables that you can configure to increase memory usage:
$ export SBT_OPTS="-Xms1024M -Xmx4G -Xss2M -XX:MaxMetaspaceSize=2G"
The variables shown are configurable to suit your own environment and project parameters.
If the issue persists, submit a request to Support.