Reputation: 4614
What is the minimum memory requirement to start JVM? I have the cheapest VPS Burstnet (512mb memory) and installed java. When I type java, it says
$java
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
When I type top, there is still around around 400MB free memory.
The support tells me the only solution is to increase my memory, I doubt his suggestion. In case it is caused by insufficient memory,I tried to create a swap file, however swap file is not allowed due to my VPS runs on OpenVS, and OpenVs does not allow swap files. http://writereadspread.blogspot.com/2010/08/swap-on-vpsopenvs.html
I would be very much appreciated if you can answer any of the following questions:
What is the cause of the issue?
What is the minimum memory requirement for installing JRE and JDK?
If u r running java apps on VPS, what is your memory, and which host r u using?
Upvotes: 0
Views: 1223
Reputation: 4614
To run Tomcat on VPS:
* if openjkd installed, uninstall
* install sun-java linux installation
* install tomcat
* run export JAVA_OPTS="-XX:MaxPermSize=64m -Xms16M -Xmx64m"
* start Tomcat ./startup.sh
Upvotes: 1