Java application "java.lang.OutOfMemoryError: Java heap space"

Solution Verified - Updated -

Issue

  • JBoss Application server stops accepting incoming requests.
  • The following message appears in the JBoss server.log  file :

    ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space 
    
  • The following log message appears in the JBoss Operations Network (JON) server log:

    Caused by: java.lang.OutOfMemoryError: Java heap space
    ERROR [STDERR] Exception in thread "RMI TCP Connection(44627)-127.0.0.1"
    ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
    
  • We would like to root cause analysis of the heap dump generated by one of our application (GRCC) and would like to get some recommendation on heap size parameter setting.

  • Application crashes 2 times a day due to heap space full and have to be restarted

Environment

  • Java (all vendors)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content