[jboss-user] [Performance Tuning] - Re: jboss 4.0.5 - OutOfMemory in 2 hours

Peter Johnson do-not-reply at jboss.com
Fri Jan 7 14:19:10 EST 2011

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-running#560894 http://www.coderanch.com/t/111262/Linux-UNIX/read-memory-usage-process-running#560894

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

Start a new discussion in Performance Tuning at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110107/6619e622/attachment.html 

More information about the jboss-user mailing list