Narain Mittal
Narain Mittal

Reputation: 1160

Java OutOfMemory due to huge JSP/HTML content in the heap

We are experiencing repeated OutOfMemoryError: Out of heap space issues in one of the application deployed on vFabric TC server. When I take a heap dump and analyze it, I find that most of the memory is being occupied by HTML/JSP content under either org.apache.jasper.compiler.JspRuntimeContext OR org.apache.jasper.runtime.BodyContentImpl classes.

What I understand from this is somehow the JSP content is getting retained in the memory and is not getting released to the GC properly.

The application is actually administrative so a limited number of users can access it. Although some of the pages are huge with a lot of data.

We are keeping maximum heap size of 2GB.

The same application is also there on test servers also with similar server setup. But we are not receiving errors on test servers. Probably because the test server instances are restarted weekly.

Any ideas on how could we resolve the problem would be appreciated

Thanks

Upvotes: 1

Views: 2172

Answers (1)

user529543
user529543

Reputation:

Take a look here maybe it helps. It is a bug in org.apache.jasper.runtime.BodyContentImpl and has memory leak.

A possible solution:

"As Jeff notes, the option -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true is available in 5.5.15 onwards"

Upvotes: 3

Related Questions