You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ramprasad Venkata Inala <ri...@cordys.com> on 2009/05/14 14:14:20 UTC

OutOfMemory Exception

Hi,

I have been using Tomcat6.1( running on windows ) for an application that has been connecting to Infor ERP LN ( formerly BaaN ).
It is given with a webapp which was installed on Tomcat and that's the way it connects to ERPLN from Tomcat.

This is setup running fine ( for 2 years now, no hassels ). As a new requirement we developed another application relying on the same architecture.
In this app we have voluminous data. So, we faced issues like "time-out exception" which was increased in server.xml as mentioned below.

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="900000000"
               redirectPort="8443" maxPostSize="0"/>

Later we ran in OutOfMemory  Exception. So I increased the memory pool sizes as shown below.

Initital memory Pool - 1024 MB
Maximum memory Pool - 1024 MB




Now that after increasing the above the error was gone. But after few requests it comes back. Since request and response sizes are about 2MB( which are usual in ERP scenarios ). The error is as below.

Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: Java heap space
java.util.logging.ErrorManager: 1
java.lang.NullPointerException
                at org.apache.juli.FileHandler.publish(FileHandler.java:136)
Exception in thread "http-8080-2" java.lang.OutOfMemoryError: Java heap space

The memory size of process has hit high and doesn't come down at all.

Mem Usage - 137,700 K
Peak Mem Usage - 784,644 K
VM Size - 1,076,804

The above is on windows machine.

Can you please suggest how to resolve the issue?

Regards,
Ramprasad

The information contained in this communication is confidential, intended solely for the use of the individual or entity to whom it is addressed and may be legally privileged and protected by professional secrecy. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. This email does not constitute any commitment from Cordys Holding BV or any of its subsidiaries except when expressly agreed in a written agreement between the intended recipient and Cordys Holding BV or its subsidiaries. Cordys is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. Cordys does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication please return the communication to the sender and delete and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: OutOfMemory Exception

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ramprasad Venkata Inala [mailto:rinala@cordys.com]
> Subject: OutOfMemory Exception
> 
> I have been using Tomcat6.1

There's no such level; what are you really running?  Also, what JVM are you using?

> The memory size of process has hit high and doesn't come down at all.

And a heap profiler says what?  You can also look at the heap after the fact if you set the JVM parameter:
  -XX:+HeapDumpOnOutOfMemoryError

Put it in CATALINA_OPTS if running Tomcat from the command line, or use the Java tab of tomcat6w.exe to add it to the JVM parameters if running as a service.  Then use jhat from the JDK to find out what's eating up all the space.

You either have a memory leak in your webapp, or you're simply trying to receive more data than will fit in the heap.  If the latter, look at Apache Commons FileUpload to fetch the data:
http://commons.apache.org/fileupload/

If the former, fix your webapp.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org