Tomcat responce time 10-200 seconds once in a while

  • Thread starter Roman Zhovtulya
  • Start date
R

Roman Zhovtulya

Dear all,
I wonder if anyone had anything similar before.
I'm running some JSP/Java Bean websites under Tomcat (on one PC as a
stand-alone server, on another in connection with Apache).

The website is a dynamic (3-tier architechture) connects to MySQL
database to get the content to display any page (around 3-4 connections
per page).

Normally the performance is really good, but about once a day it gets
really slow (around 1-5 minutes to display the page). It also recovers
autocatically to normal response time when you simply wait 5-10 minutes.

Any ideas?

I'm running Tomcat 4.05 with Apache on RedHat 8.0 (one PC) as well as
Tomcat 4.127 on SuSE 9.0 with MySQL 4.015.

I'm closing all db-connections in JSP/JavaBeans, so I don't think it's a
db-issue.

I'd highly appreciate any help on the topic.

Thank you very much,
Roman Zhovtulya
 
M

Maz Rashid

Have you considered, that this might be the garbage collector, that takes
that long?
regards
Maz
 
R

Roman Zhovtulya

Maz said:
Have you considered, that this might be the garbage collector, that takes
that long?
regards
Maz
thanks a lot for the reply.

how do I check if garbage collector really is the problem?

What can I do to decrease the delay?

How do I make garbage collector run more often?

Thanks a lot,
Roman
 
C

Christian Kalkhoff

Hi Roman,

have you ever checked if there is some maintainance script running in
mysql once a day? I dont know suse very well but some other linux
distributions bring such "Database optimization"-Cron-Jobs out of the box.

If your site is slow next time connect to the mysql database using the
commandlinetool mysql or some gui and run query "show processlist". Look
if there is something like "OPTIMIZE" in the list.

Christian
 
R

Roman Zhovtulya

Hello Christian,
Thanks a lot for the hint.
Actually, there is no "OPTIMIZE" process in the list (see the list
below), but all of the processes are in "Sleep" mode.

Where can I get the "Database optimization"-Cron-Jobs? In fact, this
list is from the database running on RedHat 8.0.

Thanks a lot,
Roman



Here is the process list:
************
Host: localhost
Database : fhoportal
Generation Time: Nov 07, 2004 at 09:59 PM
Generated by: phpMyAdmin 2.5.3
SQL-query: SHOW PROCESSLIST ;

Id User Host db Command Time State Info
26441 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 3948 NULL
34807 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 6268 NULL
37700 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 15868 NULL
40925 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 15934 NULL
64354 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 3931 NULL
76609 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 4263 NULL
79305 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 9386 NULL
79354 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 16035 NULL
81489 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 7897 NULL
96308 lugog portal.mi.fh-offenburg.de lugog Sleep 7456 NULL
96383 lugog portal.mi.fh-offenburg.de lugog Sleep 17034 NULL
99094 lugog portal.mi.fh-offenburg.de lugog Sleep 8629 NULL
100340 lugog portal.mi.fh-offenburg.de lugog Sleep 21878 NULL
101370 lugog portal.mi.fh-offenburg.de lugog Sleep 6869 NULL
103615 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 1836 NULL
108090 lugog portal.mi.fh-offenburg.de lugog Sleep 2939 NULL
108553 lugog portal.mi.fh-offenburg.de lugog Sleep 11955 NULL
109763 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 1845 NULL
109835 lugog portal.mi.fh-offenburg.de lugog Sleep 8315 NULL
112698 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 3949 NULL
112917 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 3689 NULL
113438 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 4053 NULL
114727 studentsweb portal.mi.fh-offenburg.de studentsweb Sleep 6464 NULL
115745 lugog portal.mi.fh-offenburg.de lugog Sleep 1995 NULL
118075 lugog portal.mi.fh-offenburg.de lugog Sleep 7183 NULL
123487 lugog portal.mi.fh-offenburg.de lugog Sleep 3865 NULL
126729 lugog portal.mi.fh-offenburg.de lugog Sleep 7636 NULL
126784 lugog portal.mi.fh-offenburg.de lugog Sleep 7034 NULL
128863 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 2806 NULL
128893 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 2749 NULL
129149 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 2009 NULL
129154 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 2008 NULL
129289 cupp_oasis portal.mi.fh-offenburg.de cupp_oasis_work_apps Sleep
1474 NULL
129375 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 1415 NULL
129468 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 1268 NULL
129501 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 1203 NULL
129706 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 692 NULL
129736 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 672 NULL
129743 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 667 NULL
129945 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 141 NULL
129984 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 63 NULL
130016 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 9 NULL
130022 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 2 NULL
130024 portalthetop portal.mi.fh-offenburg.de fhoportal Sleep 2 NULL
130026 root localhost fhoportal Query 0 NULL SHOW PROCESSLIST

************
 
M

marcus

Since you already have database connectivity, it looks like it would be
easy enough to start logging profiling data from each session into a new
table in the database. 'Frinstance, if the log shows every servlet (or
whatever) is handled in a similar amount of time, it might imply a
container / OS delay. If occasionally the servlet is slow, you could
put in time checks between various aspects (database connection) and see
if there is an obvious delay somewhere easy to spot.

Are there anyother delays noticed? can you telnet in during that time
period without any problems? read and write local files, stuff like that?

are you being hit by a spammer sending a lot of junq mail and clogging
yer pipes?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top