1

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 
4
  • 1
    How much memory does the server have? Commented Aug 19, 2010 at 9:12
  • Have you installed the 32 or 64 bit version of Java? Commented Aug 19, 2010 at 9:37
  • Also, what is the output of the command ulimit -a Commented Aug 19, 2010 at 9:49
  • I think it is Java 32bits Commented Aug 19, 2010 at 9:53

1 Answer 1

0

oracle's bug database is only telling something about 64bit and 1.5 version systems:
https://bugs.java.com/bugdatabase/view_bug?bug_id=6245770

but perhaps you have found the bug in another version? have you tried this parameter to reduce the size of the code cache? -XX:ReservedCodeCacheSize=48m

the bug database is mentioning some more parameters, perhaps you try them and test whether the error still occurs.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.