简体   繁体   中英

Invalid maximum heap size?

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM