There are various types of OutOfMemory errors:
java.lang.OutOfMemoryError: Java heap space
Increase -Xms and -Xmx. I would make sure that they are set to at least 256 m, and it is usually a good idea to set them to the same value.
java.lang.OutOfMemoryError: PermGen space
Add either -XX: + CMSPermGenSweepingEnabled, or increase the size of PermGen: -XX: PermSize = 256m
java.lang.OutOfMemoryError: GC upper limit exceeded
Add more heaps; the garbage collector cannot free up enough memory with each loop. Also try turning on the GC log.
java.lang.OutOfMemoryError: cannot create new native thread
Reduce your heap :) This means that you have too much memory allocated for the heap, that the OS does not have enough memory to create threads.
In the last two cases, the above can be configured in the jboss / bin / run.conf file.
Also, when JBoss shows which -X options are passed to the JVM, it prints this information by default, make sure that this is what you expect from it.
source share