Tomcat problem - could not reserve enough space

I start the server with 256 MB of RAM. The maximum heap size that I can allocate for Java is 110 MB. When I add this parameter to JAVA_OPTS, I can run java -version. The problem is that I cannot start Tomcat with these parameters. The maximum heap size for Tomcat to run is 40 MB. I don’t know why I can’t allocate more memory?

Of course, I get the error:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
+3
source share
3 answers

Set CATALINA_OPTSin -Xmx110m, JAVA_OPTS. I suppose you could set both to be sure.

+2
source

Xmx java -version. , . 2 :

, Xmx

C:\Users\Reynolds>java -version -Xmx10240M
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)

, , 10G 32- .

, Xmx

C:\Users\Reynolds>java -Xmx10240M -version
Invalid maximum heap size: -Xmx10240M
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.

C:\Users\Reynolds>java -Xmx1524M -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine. 

.

, , Java , , .

+2

The error message suggests that you do not have enough free RAM to close other applications and see if you can allocate a large heap. You may need more RAM.

+1
source

All Articles