I have a problem running Java applications on a server.
root@dobby [/opt]# jdk1.7.0_09/jre/bin/java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
...but the free RAM is about 4GB (of which 3GB is used by the Linux cache). If I add Xmx
to the command:
root@dobby [/opt]# jdk1.7.0_09/jre/bin/java -Xmx100m -version
#
# There is insufficient memory for the Java Runtime Environment to continue.
# pthread_getattr_np
# An error report file with more information is saved as:
# /opt/hs_err_pid32241.log
What's up?
Details:
- 64-bit system
- Linux 2.6.32
- CentOS 6.2
- Oracle JDK 1.7.0 update 9 (problem also occurred in an earlier version)
Java error report: http://pastebin.com/uaxdSyh3
ulimit:
root@dobby [/home/bart]# ulimit -a -S
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 62763
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) 1048576
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) 1048576
file locks (-x) unlimited
root@dobby [/home/bart]# ulimit -a H
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 62763
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) 1048576
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) 1048576
file locks (-x) unlimited