samba

Registered
Oct 12, 2006
3
0
151
Hi,

I have installed tomcat on my Linux VPS server. I can not run JVM on my server. Jsp page can not work. I have received following error while running javac command. i have installed tomcat from the WHM but it is not working.

[email protected] [/usr/local/jakarta/tomcat/bin]# javac
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Please update me. Its urgent.

Thanks,
 

samba

Registered
Oct 12, 2006
3
0
151
Hi,

I am using below mantioned linux OS.


Linux version 2.6.9-022stab078.21-enterprise (Red Hat Linux 3.3.3-7))
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
76
308
cPanel Access Level
Root Administrator
Hi,

I have installed tomcat on my Linux VPS server. I can not run JVM on my server. Jsp page can not work. I have received following error while running javac command. i have installed tomcat from the WHM but it is not working.

[email protected] [/usr/local/jakarta/tomcat/bin]# javac
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Please update me. Its urgent.

Thanks,
Sounds like you don't have enough RAM available in your VPS, thus preventing the JVM from starting. HOw much RAM does your account have?
 

plexihosting

Member
Dec 16, 2006
13
0
151
if you have limited RAM, you could create a setenv.sh file that gets loaded by the Tomcat startup script. Just Google it for the heap-related flags you can set. Though the default is typically 64MB and I wouldn't suggest going much lower than that so you might want to get more physical RAM.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
76
308
cPanel Access Level
Root Administrator
if you have limited RAM, you could create a setenv.sh file that gets loaded by the Tomcat startup script. Just Google it for the heap-related flags you can set. Though the default is typically 64MB and I wouldn't suggest going much lower than that so you might want to get more physical RAM.
Seconded. I've seen some really cheap VPS accounts places that only provide 64 MB of RAM. If that is all you have, your best option is to upgrade to at least 128 MB (though I recommend higher) and tweak the JVM runtime parameters, whether in the setenv script or the jsvc loader.
 

plexihosting

Member
Dec 16, 2006
13
0
151
Also, setenv will let you set the garbage collection parameters but on a low-end system you might want to stick to the defaults there too (until you upgrade)

EDIT: Please also note that enabling Shell Fork Bomb protection could also cause this.
 
Last edited: