I have recently deployed a java application on a VPS but It keeps crashing because the JVM runs out of memory after a while. I never had this issue on other 'low memory' servers thanks to the swap but on this VPS, It's different: There is no swap and only 50% of the actual 512megs of ram "can be used" (they say 256mbs are garanteed). Is there any way I can limit the memory consumption ? I have tried to use the xms variables but It didn't help much. I have also tried to put swap into a file but It's not allowed apparently.
Thanks in advance