You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurie Harper <la...@holoweb.net> on 2006/02/01 20:51:52 UTC

Re: [OT] java.lang.OutOfMemoryError on production server

Brian Kremmin wrote:
> Tomcat 5.0.28 gives the following error sporadically but usually after
> only a few hours of operation:
> 
> [...]
> java.lang.OutOfMemoryError
> [...]
> 
> I realize this error message could mean a number of things (and I don't
> have much further info at this time) but I'd appreciate any ideas on
> where to investigate from here?
> 
> The code and garbage collecting?
> The hardware on the physical server?
> Some tomcat settings?

All of the above, just for starters.

> Would our transition to Tomcat 5 affect the system?
> 
> Other Notes:
> 
> - We've developed a rather complex portal application using Struts 1.1.
> 
> - It's run flawlessly in our development and Staging environments.
> 
> - Deployment to our production server has proven difficult as a number
> of issues have surfaced but we've been able to fix most of them until
> this one today.
> 
> - Our production Tomcat server also supports 3 other portal
> applications.
> 
> - I've been told that the server hardware is not lacking in memory or
> processing power.

Sounds like testing in your staging environment didn't adequately 
simulate real load. And just because the server has plenty of memory 
doesn't mean your application server instance does. Did you tune your 
JVM, Tomcat and OS settings appropriately?

> Again, any brainstorms or directions for further investigation would be
> helpful... and I could probably find more information if that would be
> useful in a diagnosis.

Maybe you just have too many concurrent users for the amount of memory 
you've allocated Tomcat. More likely you have some sort of resource leak 
somewhere in your application.

All you can really do is set up a testing environment and simulate real 
load until you're able to reproduce the problem, then use any of the 
myriad Java profiling and memory usage monitoring tools to localize 
where the memory is getting eaten up.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org