Hi all,
I'm having trouble setting Java up on my virtual private server. It works fine when running under root, but if I run it under a normal user account I get this error message:
Quote:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
|
Presumably the memory allowed to be used is being limited, but I can't figure out how to change it. I've tried adjusting the -Xmx argument, but the highest value at which it will work is 18MB, which is not enough.
This is the ulimit output for the root and user accounts respectively:
Code:
# ulimit -a
core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 139264
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Code:
$ ulimit -a
core file size (blocks, -c) 200000
data seg size (kbytes, -d) 200000
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 139264
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) 200000
open files (-n) 100
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 20
virtual memory (kbytes, -v) 200000
file locks (-x) unlimited
I suspect the problem is due to the virtual memory, but there doesn't appear to be any way to set the value in limits.conf. If I manually lower it to 200000kB under root I get the same error message.
Any help would be appreciated.
Thanks.
Edit: I'm using Red Hat x86_64, kernel 2.6.18-028stab070.2.