Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question

migrated from stackoverflow.com Aug 19 '10 at 12:46

This question came from our site for professional and enthusiast programmers.

1  
How much memory does the server have? –  Joachim Sauer Aug 19 '10 at 9:12
    
Have you installed the 32 or 64 bit version of Java? –  Pram Aug 19 '10 at 9:37
    
Also, what is the output of the command ulimit -a –  Pram Aug 19 '10 at 9:49
    
I think it is Java 32bits –  PeterMmm Aug 19 '10 at 9:53

1 Answer 1

oracle's bug database is only telling something about 64bit and 1.5 version systems:
http://bugs.sun.com/bugdatabase/view_bug.do?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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.