OutOfMemoryExceptions

OutOfMemoryExceptions

 

This section attempts to cover some of the most common reasons why you may see an OutOfMemoryException from your JBoss application server.

 

Interestingly, there are several cases where the JVM may report an OutOfMemoryException even if it is not really out of all of its available memory. For example, most modern Java virtual machines segment the memory heap into generations. Your virtual machine may complain about lack of memory when it has only exhausted one segment (a specific generation) from its total maximum heap size. Also under some conditions on Linux/Unix systems running out of some Operating System resources may yield an OutOfMemoryExceptions (for example the inability for the OS to create more new threads for the JVM).

 

Of course, it is also possible to get an "old fashioned" OutOfMemoryException when your Java virtual machine really does run out of its maximum heap. There could be few reasons for this, for example you may have a cache configuration that allows more instances to be kept in memory than the JVM really can fit into its heap. Or it may be simply that your JVM has been configured with a maximum heap size too small to run all your application server services.