Could not reserve enough space for object heap

后端 未结 26 1315
余生分开走
余生分开走 2020-11-22 05:59

I am getting the following exception repeatedly each time I try to run the program.

Error occurred during initialization of VM

Could not reserve e

26条回答
  •  无人及你
    2020-11-22 06:59

    Error :

    For the error, "error occurred during initialization of vm could not reserve enough space for object heap jboss"

    Root Cause :

    • Improper/insufficient memory allocation to our JVM as mentioned below.

    • e.g. JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MaxPermSize=256m" in jboss-eap-6.2\bin\standalone.conf or "JAVA_OPTS=-Xms1G -Xmx1G -XX:MaxPermSize=256M" in jboss-eap-6.2\bin\standalone.conf.bat which is nothing but JVM memory allocation pool parameters.

    Resolution :

    • Increase the heap size. To increase the heap size,
    • goto -> jboss-eap-6.2\bin\standalone.conf.bat or jboss-eap-6.2\bin\standalone.conf
    • change ->JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=256m" where -Xms is Minimum heap size and -Xmx is Maximum heap size.
    • Usually its not recommanded to have same size for min and max.

    • If you are running your application from eclipse,

    • Double click on the server
    • select 'open launch configuration' you will be redirected to the window 'Edit launch configuration properties'.
    • In this windown goto the tab '(x)=Arguments'.
    • In VM Arguments, define your heap size as mentioned below
    • "-Dprogram.name=JBossTools: JBoss EAP 6.1+ Runtime Server" -server -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true

提交回复
热议问题