RE: Why does Tomcat become slow during weekends?

2008-04-22 Thread Peter Crowther
 From: murthy gandikota [mailto:[EMAIL PROTECTED]
 We have a website based on embedded Tomcat with Jboss 4.0.2.
 We noticed that every weekend the Tomcat becomes sluggish.

Backups?  Congestion on the network due to a site that's only accessed heavily 
at weekends?

 We theorized that JVM is busy with garbage collection.
 Is that realistic?

No.  The JVM collects garbage at intervals measured in seconds or minutes, and 
takes milliseconds or seconds.  It also doesn't know about weekends :-).

 Does anyone have any other suggestions?

I'd guess system maintenance of some kind.  Is this on a physical server or a 
virtual one?

- Peter

-
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: Why does Tomcat become slow during weekends?

2008-04-22 Thread murthy gandikota


Peter Crowther [EMAIL PROTECTED] wrote: From: murthy gandikota 
[mailto:[EMAIL PROTECTED]
 We have a website based on embedded Tomcat with Jboss 4.0.2.
 We noticed that every weekend the Tomcat becomes sluggish.

Backups? Congestion on the network due to a site that's only accessed heavily 
at weekends?
   
  There are no backups. The website uses DB2 which is backed up infrequently. 
And all of our users use the site during business hours on weekdays.
  
 We theorized that JVM is busy with garbage collection.
 Is that realistic?

No. The JVM collects garbage at intervals measured in seconds or minutes, and 
takes milliseconds or seconds. It also doesn't know about weekends :-).

  I forgot to mention that there is an apache/mod-jk load balancer in the front 
end. On weekends we end up restarting everything including apache and jboss. 
   
 Does anyone have any other suggestions?

I'd guess system maintenance of some kind. Is this on a physical server or a 
virtual one?

  There is no other system maintenance more than what I have mentioned. The 
Tomcat runs on a physical server. Heard a virtual server will be even slower.
  
- Peter

  Thanks
  Murthy

   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: Why does Tomcat become slow during weekends?

2008-04-22 Thread Philip Wigg
 We have a website based on embedded Tomcat with Jboss 4.0.2. We noticed that 
 every weekend the Tomcat becomes sluggish. I mean there are no errors like 
 HTTP404. The website simply hangs. We theorized that JVM is busy with garbage 
 collection. Is that realistic? Does anyone have any other suggestions?

What's the load average or CPU busy time of the server? Do you, or
might you expect, to get more website traffic at weekends?

Are there any obvious causes of Tomcat hanging? For example, if you
look inside the Tomcat manager application can you see if you are
running out of free heap space?

-
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: Why does Tomcat become slow during weekends?

2008-04-22 Thread Peter Crowther
 From: murthy gandikota [mailto:[EMAIL PROTECTED]
 Peter Crowther [EMAIL PROTECTED] wrote:
 From: murthy gandikota [mailto:[EMAIL PROTECTED]
  We have a website based on embedded Tomcat with Jboss 4.0.2.
  We noticed that every weekend the Tomcat becomes sluggish.
[...]
   There is no other system maintenance more than what I have
 mentioned. The Tomcat runs on a physical server. Heard a
 virtual server will be even slower.

Generally yes.  If it was on a virtual server, I'd have suggested that another 
virtual server on the same host might have been hogging resources - but that's 
not an option.

My next suggestion is to look for the gross cause of the slowdown.  Performance 
Monitor (on Windows) or top / vmstat (on UNIX) and see whether you're short of 
memory, CPU or disk bandwidth when the system goes slow.  If one of those is 
the problem, the next step is to narrow down which process is the memory, CPU 
or I/O hog and find out why it only happens at weekends.  If you're not short 
of any of those, the next step would probably be to look at your database 
server and try to work out whether that's somehow causing the slowdown.

- Peter

-
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: Why does Tomcat become slow during weekends?

2008-04-22 Thread David kerber

murthy gandikota wrote:

Peter Crowther [EMAIL PROTECTED] wrote: From: murthy gandikota 
[mailto:[EMAIL PROTECTED]
  

We have a website based on embedded Tomcat with Jboss 4.0.2.
We noticed that every weekend the Tomcat becomes sluggish.



Backups? Congestion on the network due to a site that's only accessed heavily 
at weekends?
   
  There are no backups. The website uses DB2 which is backed up infrequently. And all of our users use the site during business hours on weekdays.
  
  

We theorized that JVM is busy with garbage collection.
Is that realistic?



No. The JVM collects garbage at intervals measured in seconds or minutes, and 
takes milliseconds or seconds. It also doesn't know about weekends :-).

  I forgot to mention that there is an apache/mod-jk load balancer in the front end. On weekends we end up restarting everything including apache and jboss. 
   
  

Does anyone have any other suggestions?



I'd guess system maintenance of some kind. Is this on a physical server or a 
virtual one?

  There is no other system maintenance more than what I have mentioned. The 
Tomcat runs on a physical server. Heard a virtual server will be even slower.
  
- Peter


  Thanks
  Murthy
  
Just a SWAG:  Maybe the traffic slows down so much that the database (if 
there is one) is timing out connections and dumping stuff from its 
cache, so that when people do hit it, the db has to create a new 
connection and read lots of stuff from disk, which was in RAM cache 
during the week?


D



-
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: Why does Tomcat become slow during weekends?

2008-04-22 Thread murthy gandikota


David kerber [EMAIL PROTECTED] wrote:
Just a SWAG: Maybe the traffic slows down so much that the database (if 
there is one) is timing out connections and dumping stuff from its 
cache, so that when people do hit it, the db has to create a new 
connection and read lots of stuff from disk, which was in RAM cache 
during the week?
D

  This seems likely as we have seen some problems with DB connections. I am not 
sure how to keep the DB connections alive when there is no traffic on the 
website.
   
  Thanks 
  Murthy 


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




   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: Why does Tomcat become slow during weekends?

2008-04-22 Thread David kerber

murthy gandikota wrote:
David kerber [EMAIL PROTECTED] wrote:
  
Just a SWAG: Maybe the traffic slows down so much that the database (if 
there is one) is timing out connections and dumping stuff from its 
cache, so that when people do hit it, the db has to create a new 
connection and read lots of stuff from disk, which was in RAM cache 
during the week?

D



  This seems likely as we have seen some problems with DB connections. I am not 
sure how to keep the DB connections alive when there is no traffic on the 
website.
  
What we ended up doing was extending the connection timeout setting in 
the database so that it would keep it alive over a weekend.  Of course, 
this will use a few more resources on the DB server, but that's not 
likely to be limiting. 

I don't know what you could do about the cold cache issue, though; maybe 
a cron job to periodically run some typical queries against the 
database?  Actually, that would take care of the connection timeout 
issues as well.


D



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