Saturday, August 7, 2010

swap on VPS(OpenVS)

I have problem starting java virtual machine on my VPS. The cause is there is not enough heap to be allocated for JVM.

$ java
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
The fix for me is that my java is OpenJDK, so I uninstalled it and reinstalled the Sun implementation and fixed the problem.



Related stuff:
This came down to my VPS has only 500mb memory. I want to try if adding more swap can solve the problem. And ended up finding out Swap is not allowed on OpenVS. from this link. http://forums.vpslink.com/linux/1567-how-create-swapfile-your-vps.html

When I tried to create swap file according to https://help.ubuntu.com/community/SwapFaq  I get:

   swapon failed: Operation not permitted
Burstnet suggested me to increase my memory.
I would want to if there are other solutions..

1 comment:

  1. which java jdk version did u install to get it to work?
    i tried jdk-1.6.0_20-fcs.i586.rpm, still got the same error...

    ReplyDelete