> -----Original Message-----
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
> Sent: December 2, 2003 6:55 AM
> To: Tomcat Users List
> Subject: RE: OutOfMemoryError
> 
> 
> Howdy,
> 
> >Dhruva B. Reddy wrote:
> >> We get OutOfMemoryError's on Tomcat 4.1.27, running on RH 7.3, Sun
> JDK
> >> 1.4.1_02 (with 512MB allocated to it)  The box has 1GB of 
> RAM, 2GB of
> >> swap space, and four Xeon processors.
> 
> Can you reproduce the errors in a test environment?
> 
> >Are you using the context reloading feature?  "reloadable=true" or
> using
> >the tomcat manager app will cause this to happen eventually.
> 
> Really?  Prove that please...

Actually, I can't prove it in his instance, but I have proved it time and time
again on ours.  I'm using 4.0.4 right now though so I haven't verified 4.1.x.
But, I heard that this is still the case in 4.1.x.

To reproduce this problem just reload a context over and over.  Depending on
how much memory it uses, it will start throwing OutOfMemory exceptions long
before the -mx JVM parameter value is ever reached.  eg.  I do a ps on linux
and it shows it as using like 140M or something like that and it already
starts throwing out of memory exceptions.

With our applications that we're running, we can usually get away with roughly
5-10 context reloads.

> 
> >> calls Runtime.freeMemory() and .totalMemory(), it comes 
> nowhere near
> >> using that much (we track it every five minutes by hitting 
> a servlet
> >> that calls these methods).
> 
> It could easily happen that:
> - You check memory, everything is fine
> - User makes a request for a large dataset, you load it, run out of
> memory.
> 
> So your check is not conclusive.  The stack trace suggested that the
> error occurred while iterating through a ResultSet, so one thing you
> should log are all the SQL queries you run and what they return: you
> probably got a large one to cause the error.
> 
> Yoav Shapira
> 
> 
> 
> This e-mail, including any attachments, is a confidential 
> business communication, and may contain information that is 
> confidential, proprietary and/or privileged.  This e-mail is 
> intended only for the individual(s) to whom it is addressed, 
> and may not be saved, copied, printed, disclosed or used by 
> anyone else.  If you are not the(an) intended recipient, 
> please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__ 
    This communication is intended for the use of the recipient to whom it
    is addressed, and may contain confidential, personal, and or privileged
    information. Please contact us immediately if you are not the intended
    recipient of this communication, and do not copy, distribute, or take
    action relying on it. Any communications received in error, or
    subsequent reply, should be deleted or destroyed.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to