Peter Johnson [
http://community.jboss.org/people/peterj] created the discussion
"Re: jboss 4.0.5 - OutOfMemory in 2 hours"
To view the discussion, visit:
http://community.jboss.org/message/579571#579571
--------------------------------------------------------------
This is not an "out of heap space" error. The JVM is asking the OS for more
memory and the OS is saying "no." One possible cause for this is that a new
thread was being created and there was insufficient memory on the system to allocate the
memeory for the thread stack. Another posibility is that another file was being opened and
there was no space for the file handle. Here is a post I did a while back on all of the
memeory used by the JVM:
http://www.coderanch.com/t/111262/Linux-UNIX/read-memory-usage-process-ru...
http://www.coderanch.com/t/111262/Linux-UNIX/read-memory-usage-process-ru...
Looks like you are running a 32-bit JVM. So you could still have plenty of memory (RAM +
pagefile), but run out of room in the 4GB process space.
Looking at the dump stack it appears that a compiler thread was running at the time. Most
likely the JIT compiler needed to allocate more memory to hold the compiled code. I
don't think the compiled code is kept in the permgen (but I am not sure and I
haven't found a definitive source that says one way or the other). But if it is,
setting -XX:PermSize=192m should solve the problem (that will force the JVM to allocate
the 192MB for the permgen at startup). If that doesn't work, you will have to reduce
the heap size, or reduce the stack size for the threads. Or switch to a 64-bit JVM.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/579571#579571]
Start a new discussion in Performance Tuning at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]