Invalid maximum heap size?

17,887

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

Share:
17,887
Ishmeet Singh
Author by

Ishmeet Singh

Updated on June 08, 2022

Comments

  • Ishmeet Singh
    Ishmeet Singh almost 2 years

    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 ?