i have a Ubuntu server
# uname -a Linux 2.6.18-028stab064.7 #1 SMP Wed Aug 26 13:11:07 MSD 2009 i686 GNU/Linux
Java starts with this options (it won't start with no extra opts):
Picked up _JAVA_OPTIONS: -Xms20m -Xmx64m
I can run 1 Java process (it is a Jetty based standalone)
When i want to start another Java process i get this:
# java -version Picked up _JAVA_OPTIONS: -Xms20m -Xmx64m Error occurred during initialization of VM Could not reserve enough space for code cache
Server memory
# top top - 11:20:22 up 20 days, 13:15, 1 user, load average: 0.00, 0.02, 0.05 Tasks: 46 total, 2 running, 44 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 5123756k total, 170260k used, 4953496k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k cached # java -version Picked up _JAVA_OPTIONS: -Xms20m -Xmx64m java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b06) Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode) # file java java: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped # ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 16383 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited 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) 16383 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
ulimit -a