Understanding the OutOfMemoryError

Whenever you find yourself staring a stacktrace with OutOfMemoryError in it, it should all be crystal clear. The program has got no more elbow room and is dying just because of lack of it. From the 10,000 feet or executive chair this might already contain too much information. But those of you who have to build or maintain the applications and figure out why a particular error is created – we can share a bit more insight into the issue.

In this post we will take a look what do different OutOfMemoryError messages actually mean. We start with the most common cases and move forward to the more interesting situations.
 

  • java.lang.OutOfMemoryError: Java heap space
  • java.lang.OutOfMemoryError: PermGen space
  • java.lang.OutOfMemoryError: GC overhead limit exceeded
  • java.lang.OutOfMemoryError: unable to create new native thread
  • java.lang.OutOfMemoryError: nativeGetNewTLA

Source : http://www.javacodegeeks.com/2013/08/understanding-the-outofmemoryerror.html

Back to Top