Re: OutOfMemory Error in Tomcat



kaicallguy@xxxxxxxxx said:
I setup a tomcat server in win server2003.
My config. :
-jdk1.5.0_12
-Tomcat5.0.28
-struts
-hibernate3
-mssql2000
-pc memory 2G
-Xmx = 1024M

I checked the program that all session are close. I used "-Xincgc" for
force processing garbage collection but the memory usage increases
continuously. I also checked the full thread dump log but i can't find
any problem.

It looks like something leaves references to session data for closed
sessions - so that the data cannot be collected.

Look for places where you use aggregates (arrays, various collections),
and try to get a way to monitor their sizes. Heap analysis tools could
also tell the amounts of object instances, which might help in pinpointing
the problem.

Of commercial tools, I've succesfully solved similar problems with
YourKit - see http://yourkit.com/ . YourKit is a "fancy heap analysis
tool" (ok, it does other things as well, but for my use it has been
just that), which lets you drill into memory usage of a Java program
(standalone as well as server-based).
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
.



Relevant Pages

  • Re: headers sent issue
    ... huge waste of resources, cpu & memory. ... You are using memory for buffering that hypothetically could be needed ... will keep the use of memory & CPU to a minimum. ... start session ...
    (comp.lang.php)
  • Re: headers sent issue
    ... huge waste of resources, cpu & memory. ... You are using memory for buffering that hypothetically could be needed ... will keep the use of memory & CPU to a minimum. ... start session ...
    (comp.lang.php)
  • Re: memory leak in asp 2.0
    ... If to be placed into session it should exist in session then it will ... put object which refers to web service into session I will not put into ... so I was able to watch how much memory I need. ... When I load first page the memory ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: ASP.NET High memory usage
    ... As for the memory consumpting issue you mentioned, I think the Session ... applicaiton's memory usage, you can use the application sever's performance ... How can we measure the total session memory consumption for a worker ...
    (microsoft.public.dotnet.framework.performance)
  • Re: ASP.NET memory management
    ... As Jason has mentioned, generally we are recommended not to store large ... recommend to use since object stored there won't be automatically cleared. ... you're using 2k3 server with iis6, there is a memory recycle limit setting ... | shouldn't really be living on the Session except as a last resort. ...
    (microsoft.public.dotnet.framework.aspnet)