OutOfMemory Exception

2009-05-14 Thread Ramprasad Venkata Inala
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=9
   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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: OutOfMemory Exception

2009-05-14 Thread Caldarale, Charles R
 From: Ramprasad Venkata Inala [mailto:rin...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



When does Tomcat throw an OutOfMemory exception?

2008-11-30 Thread Karim Zaki
Greetings all,

I would like someone to shed a bit of light on when exactly Tomcat throws an 
OutOfMemory exception. Is it when its physical memory usage (working set) 
reaches the maximum limit configured in the JVM startup parameters, or are 
other conditions that can cause this? I've noticed that sometimes I get these 
exceptions when the working set is well below the value specified in -Xmx.

Thanks,
Karim

---
Although the moon is smaller than the earth, it is farther away.



Re: When does Tomcat throw an OutOfMemory exception?

2008-11-30 Thread Leon Rosenberg
hi,

there are many occasions.

1. if there is no memory left (-Xmx)
2. if there is no perm gen space left (for example to many jsps)
3. if there is not enough space in the current heap and no time to
enlarge the heap (xms  xmx)
4. if a new thread couldn't be created
5-10 whatever the jvm vendor thought funny

regards
Leon

On Sun, Nov 30, 2008 at 2:16 PM, Karim Zaki [EMAIL PROTECTED] wrote:
 Greetings all,

 I would like someone to shed a bit of light on when exactly Tomcat throws an 
 OutOfMemory exception. Is it when its physical memory usage (working set) 
 reaches the maximum limit configured in the JVM startup parameters, or are 
 other conditions that can cause this? I've noticed that sometimes I get these 
 exceptions when the working set is well below the value specified in -Xmx.

 Thanks,
 Karim

 ---
 Although the moon is smaller than the earth, it is farther away.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: When does Tomcat throw an OutOfMemory exception?

2008-11-30 Thread Karim Zaki
Thanks for the clarification. The JVM doesn't indicate which of these 
conditions actually caused the exception, though, does it?

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 30, 2008 3:55 PM
To: Tomcat Users List
Subject: Re: When does Tomcat throw an OutOfMemory exception?

hi,

there are many occasions.

1. if there is no memory left (-Xmx)
2. if there is no perm gen space left (for example to many jsps)
3. if there is not enough space in the current heap and no time to
enlarge the heap (xms  xmx)
4. if a new thread couldn't be created
5-10 whatever the jvm vendor thought funny

regards
Leon

On Sun, Nov 30, 2008 at 2:16 PM, Karim Zaki [EMAIL PROTECTED] wrote:
 Greetings all,

 I would like someone to shed a bit of light on when exactly Tomcat throws an 
 OutOfMemory exception. Is it when its physical memory usage (working set) 
 reaches the maximum limit configured in the JVM startup parameters, or are 
 other conditions that can cause this? I've noticed that sometimes I get these 
 exceptions when the working set is well below the value specified in -Xmx.

 Thanks,
 Karim

 ---
 Although the moon is smaller than the earth, it is farther away.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: When does Tomcat throw an OutOfMemory exception?

2008-11-30 Thread Caldarale, Charles R
 From: Karim Zaki [mailto:[EMAIL PROTECTED]
 Subject: RE: When does Tomcat throw an OutOfMemory exception?

 The JVM doesn't indicate which of these conditions
 actually caused the exception, though, does it?

Depends on the JVM version and vendor.  Newer ones from Sun are much better at 
describing the underlying problem.

To add to Leon's list: running out of file descriptors.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: When does Tomcat throw an OutOfMemory exception?

2008-11-30 Thread Kees Jan Koster

Dear Chuck,


To add to Leon's list: running out of file descriptors.


Actually, in such situations you get 'java.io.IOException: Too many  
open files' or 'java.net.SocketException: Too many open files'. Not an  
OutOfMemory error.


/nitpick
--
Kees Jan

http://java-monitor.com/forum/
[EMAIL PROTECTED]
06-51838192

Rule 1 for being in a hole: stop digging.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: When does Tomcat throw an OutOfMemory exception?

2008-11-30 Thread Caldarale, Charles R
 From: Kees Jan Koster [mailto:[EMAIL PROTECTED]
 Subject: Re: When does Tomcat throw an OutOfMemory exception?

 Actually, in such situations you get 'java.io.IOException: Too many
 open files' or 'java.net.SocketException: Too many open files'. Not an
 OutOfMemory error.

Only if it's related to an application-initiated action, such as opening a 
stream.  If FD exhaustion is detected during an internal JVM operation, that 
will often result in an OOME.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: When does Tomcat throw an OutOfMemory exception?

2008-11-30 Thread Kees Jan Koster

Dear Chuck,


Actually, in such situations you get 'java.io.IOException: Too many
open files' or 'java.net.SocketException: Too many open files'. Not  
an

OutOfMemory error.


Only if it's related to an application-initiated action, such as  
opening a stream.  If FD exhaustion is detected during an internal  
JVM operation, that will often result in an OOME.


Oh, that is interesting. Thank you for correcting me. I guess they  
needed a RuntimeException and picked OOME. Grepping through the  
sources reveals that there are some other sources of OOME's too. I'd  
have to look at them to see which resource is actually being depleted,  
but it's a reminder to read the exception message with some attention.

--
Kees Jan

http://java-monitor.com/forum/
[EMAIL PROTECTED]
06-51838192

Human beings make life so interesting. Do you know that in a universe  
so full of wonders,
they have managed to invent boredom. Quite astonishing... -- Terry  
Partchett



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



OutOfMemory exception when deploying using manager app / catalina-ant

2007-06-28 Thread Chris Jölly
Hello!
 
i use ant for application building and the ant tasks defined in
catalina-ant.jar Catalina-Ant-Task for deploying the ready build 
war file to a tomcat installation. (tomcat 4.1.29)
 
removing and deploying the war works, but after a few removals/deployments 
the vm reports an java.lang.OutOfMemory exception and stops 
deployment of the application. if i increase the memory size 
of the tomcat vm then the problem appears a few deployments later.
 
it seems that tomcat doesn't remove the webapp so that the vm can
free the memory used by this app.
 
i searched the archive and found others having this problem, but
no real solution for this problem.
 
is there a solution on this problem?
 
thx, chris


Re: OutOfMemory exception when deploying using manager app / catalina-ant

2007-06-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris,

Chris Jölly wrote:
 removing and deploying the war works, but after a few removals/deployments 
 the vm reports an java.lang.OutOfMemory exception and stops 
 deployment of the application. if i increase the memory size 
 of the tomcat vm then the problem appears a few deployments later.

This usually suggests that the application you are re-deploying is not
properly releasing objects and hanging around after it should be been
destroyed.

Often, this is caused by putting objects loaded by the webapp's
ClassLoader into something like a collection that is being retained by
the server. That causes the ClassLoader to stick around and keep all of
the java.lang.Class objects, their associated data, the JIT'd code and
everything else when it's no longer practical.

Basically, you're loading Class files until you bust your heap.

Fixing this usually requires careful analysis of what your code is doing
with long-lived objects. A memory profiler can sometimes help, but you
can easily start chasing your tail when you see /everything/ that the
runtime has laying around in memory.

I would start by checking your interactions with any libraries that you
have being loaded by the Tomcat classloaded (that is, anything in
$TOMCAT_HOME/common/lib for pre-TC6.0 or $TOMCAT_HOME/lib for TC6.0+.
You may find that Tomcat is loading some library and it has a cache of
data from your deployed webapp that is preventing disposal of that
ClassLoader.

Hope that helps,
- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGg+BC9CaO5/Lv0PARApYgAKCNwaOCP1P1vMSJzb0mssQtXeehXwCfe42p
lOvHhk4U/3rc9VyJ80Yv6Mc=
=0Osi
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]