GC overhead limit exceeded when compiling

Hi - I can't compile my code any more.
If I work directly from SBT I use -mem 2000 as a parameter and it works ok (also compilation hits all threads).
Using intellij it's on one thread and then it falls over with

scala: Error: GC overhead limit exceeded
java.lang.OutOfMemoryError: GC overhead limit exceeded

I've set my Compile process heap size to 2000 which therefore ought to be same as sbt - but it doesn't make any difference.

Is there anything else I can do?

Comment actions Permalink

some more on this. When running the external compiler there appear to be two processes run. One of them - the one that is eating all the cpu has -XmX1024m as a parameter. The other one - which is doing no significant cpu work has obtained the parameters from the compiler box. So it looks like process A gets the paramters and fires up process B which doesn't - but B is the compiler. Anyone care to confirm?

Comment actions Permalink

For Scala we have one more compiler server, which does all compiling work
External compiler engine is another process, which is lightweight.
To increase memory settings for Scala compiler server you should go to your compiler server settings: Settings -> IDE settings -> Scala -> JVM max heap...

Best regards,
Alexander Podkhalyuzin.

Comment actions Permalink

Hey thanks. didn't see that one!

Comment actions Permalink

That setting doesn't work if you use the external SBT shell for compilation, does it?


Please sign in to leave a comment.