Re: Webapp slow down after idle - 5.5.x

2010-02-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

On 2/22/2010 2:14 PM, Peter Crowther wrote:
 On 22 February 2010 19:07, Caldarale, Charles R
 chuck.caldar...@unisys.com wrote:
 Sounds like the OS might be paging out Tomcat, and taking a long time to get 
 all the necessary pages back in when a request is made.  I'm not familiar 
 with operational details of AIX, but I would suspect there are some 
 system-level monitoring tools available to see if there is a paging spike in 
 this situation.
 
 vmstat 
 (http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds6/vmstat.htm)
 would do the job.  No finesse, but sufficient information :-).

+1

If Tomcat/JVM is being swapped-out or otherwise passivated, a simple
are you alive script can be scheduled to run at intervals to keep
Tomcat in memory.

Something like every hour or maybe every minute, you could make a
request to some trivial page like /ping.jsp.

Another possibility is that your webapp uses database connections which
are becoming stale during these periods of inactivity. Oracle,
specifically, is well-known for taking a long time to re-establish a
database connection, so it's possible you're waiting for that to happen
after these idle times.

Several solutions are possible, including:
1. Use the ping.jsp technique to also issue a trivial query against the
database
2. Change your database connection configuration to allow for longer
idle times

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuEJwEACgkQ9CaO5/Lv0PDZCwCeM8Yc259GpiqPB/KkgotGdBVL
epsAoID+/TlQ8FQSB4/4LpKLIsKewfhT
=EuRI
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Webapp slow down after idle - 5.5.x

2010-02-23 Thread Hassan Schroeder
On Tue, Feb 23, 2010 at 11:05 AM, Christopher Schultz
ch...@christopherschultz.net wrote:

 Something like every hour or maybe every minute, you could make a
 request to some trivial page like /ping.jsp.

Which is exactly what a service monitor like Nagios does -- plus it
lets you know if the proper response isn't received (no response,
error page/wrong page size, etc.).

I would think every production system would have something like
that in place as a matter of course.

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Webapp slow down after idle - 5.5.x

2010-02-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hassan,

On 2/23/2010 2:19 PM, Hassan Schroeder wrote:
 On Tue, Feb 23, 2010 at 11:05 AM, Christopher Schultz
 ch...@christopherschultz.net wrote:
 
 Something like every hour or maybe every minute, you could make a
 request to some trivial page like /ping.jsp.
 
 Which is exactly what a service monitor like Nagios does -- plus it
 lets you know if the proper response isn't received (no response,
 error page/wrong page size, etc.).
 
 I would think every production system would have something like
 that in place as a matter of course.

I would think so. We have our own that reports heap usage, database
connection pool usage, and the patch level of the JVM. We can use it to
graph memory usage over long periods of time using whatever sampling
rate we choose, because it's all based upon when the request is made.
Every 5 minutes? No problem. Every 5 seconds? Just change the cron job. :)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuETK8ACgkQ9CaO5/Lv0PCdVwCfWqWqmEloAvZvjDCuGs8LdTzh
C0UAoKOxjXHGvi0QoOPQkhyvjl9uStn2
=Uxtn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Webapp slow down after idle - 5.5.x

2010-02-22 Thread klinham
Hello,

My webservice (using axis 1.1)is deployed on tomcat 5.5.28. Tomcat runs on AIX 
and IBM Java 1.5 SR9. The problem is that every first request after a longer 
idle (like a day) is served very slow. There's no performance problem with next 
requests. It looks quite similar to first request after tomcat restart yet 
there's no restart here.
It's very difficult to spot the problem since most of the time everything runs 
fine and I have like one chance a day to test some new options.

Any ideas about that ? 
Thanks in advance, Kate

--
Kup wlasne mieszkanie za 72 tys. zl.
Sprawdz najlepsze oferty  http://link.interia.pl/f25a8


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Webapp slow down after idle - 5.5.x

2010-02-22 Thread Len Popp

One thing that comes to mind is virtual
memory swapping. If Tomcat is idle for a long time, all of its memory  
may be swapped out to disk to make room for other programs. Then when  
Tomcat needs to handle a request, it must be swapped back in from disk  
which takes time.


I've observed the hard disk light flickering when this happens but I  
don't know if you want to spend the night camping in the server room  
watching for this.

--
Len


On 2010-02-22, at 13:29, klin...@poczta.fm wrote:


Hello,

My webservice (using axis 1.1)is deployed on tomcat 5.5.28. Tomcat  
runs on AIX and IBM Java 1.5 SR9. The problem is that every first  
request after a longer idle (like a day) is served very slow.  
There's no performance problem with next requests. It looks quite  
similar to first request after tomcat restart yet there's no restart  
here.
It's very difficult to spot the problem since most of the time  
everything runs fine and I have like one chance a day to test some  
new options.


Any ideas about that ?
Thanks in advance, Kate

--
Kup wlasne mieszkanie za 72 tys. zl.
Sprawdz najlepsze oferty  http://link.interia.pl/f25a8


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Webapp slow down after idle - 5.5.x

2010-02-22 Thread Caldarale, Charles R
 From: klin...@poczta.fm [mailto:klin...@poczta.fm]
 Subject: Webapp slow down after idle - 5.5.x
 
 The problem is that every first request after a longer idle 
 (like a day) is served very slow.

Sounds like the OS might be paging out Tomcat, and taking a long time to get 
all the necessary pages back in when a request is made.  I'm not familiar with 
operational details of AIX, but I would suspect there are some system-level 
monitoring tools available to see if there is a paging spike in this situation.

 - Chuck 


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



Re: Webapp slow down after idle - 5.5.x

2010-02-22 Thread Peter Crowther
On 22 February 2010 19:07, Caldarale, Charles R
chuck.caldar...@unisys.com wrote:
 Sounds like the OS might be paging out Tomcat, and taking a long time to get 
 all the necessary pages back in when a request is made.  I'm not familiar 
 with operational details of AIX, but I would suspect there are some 
 system-level monitoring tools available to see if there is a paging spike in 
 this situation.

vmstat 
(http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds6/vmstat.htm)
would do the job.  No finesse, but sufficient information :-).

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org