File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat: Out Of Memory Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat: Out Of Memory Exception" Watch "Tomcat: Out Of Memory Exception" New topic

Tomcat: Out Of Memory Exception

Adalberto Toledo

Joined: Mar 10, 2011
Posts: 14
I have a problem, I'm using Tomcat 7.0.4 in JDK web server to deploy my web application.

The problem after a day my tomcat says: "OutOfMemoryException: Java Heap Space", and the memory that I assigned is 500 MB in JAVA_OPTS and CATALINA_OPTS environments variables.

I'm using the Nio Protocol in my application because I need some comet procedures.

My server is ubuntu 10.04 LTS
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
If this was my problem I would be using the Tomcat management app to monitor Thread and memory use. Perhaps you will be able to see a pattern emerge.

For example, you might see some request threads that never complete a request.

I agree. Here's the link:
subject: Tomcat: Out Of Memory Exception
It's not a secret anymore!