2
votes

I am running an grails application for my project in IntelliJ and I have set the vm options to :

-Dserver.port=8080 -Xms3g -Xmx3g -XX:-UseGCOverheadLimit -Xverify:none

The logs are :

Running Grails application

Invalid maximum heap size: -Xmx4096M

The specified size exceeds the maximum representable size.

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.

Error | Forked Grails VM exited with error

Please help me with that ?

1
How much RAM you have available? What operating system do you use? Which JDK have you installed?Juraj Martinka

1 Answers

6
votes

I have no chance to write comment, that's why I am writing answer directly.

If your JVM is 32bit, then heap size should lower than 4gb. Either you can install 64bit JVM, or set the maximum heapspace to 2GB with -Xmx2048M. I had similar problem and this worked for me, hope this helps you as well