I've seen this kind of behavior happen in the past because the HttpSessions are not 
getting garbaged correctly, which results in ever increasing heap. this leads to the 
GC taking more and more time to mark/sweep the heap.
 
in my case, the HttpSessions were set to expire in 1 week, so over several hours the 
memory usage grew steadily. The other thing I've seen is when a server is under 
constant load and HttpSession is used to store complex objects, the VM delays GC which 
resuls in the heap growing.  The solution to this particular problem is to explicitly 
invalidate the session and to clear all the objects. In my case, the objects stored in 
the HttpSession has collections and were hierarchical, so there was lots of circular 
references. Once I explicitly invalidate the session and clear the objects, the VM 
GC-ed the objects immediately.
 
the problem you see may not be applicable, but hopefully it helps track down the 
problem.
 
peter


"Adamczyk, Bartosz" <[EMAIL PROTECTED]> wrote:
Hi everyone,



I have a web application that I am running on Tomcat 4.1.24.
This web application consists of some JSPs, some Servlets and some Tag
Libraries. I did some testing using Jmeter where I logged the results with
PerfMon in Windows XP. I noticed that the average CPU usage grows linearly
as time goes by. For example, if I let the test run for about 16 hours, the
avg CPU goes from 10% to about 40%. I also notice that the Page file bytes
increases with time. All the other counters that I logged look ok.



The web application that I am using uses the httpsession to
store information. I know that the session timeout is 30 minutes on the
Tomcat server that I am running. Is it possible that this might be causing
this increase in average CPU? Can anyone suggest any reasons why this might
be happening? I've never seen the average CPU to grow before so I am
baffled by this.



Any help would be greatly appreciated.



Thank you,



Bart


                
---------------------------------
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.

Reply via email to