Tomcat responce time 10-200 seconds once in a while

Discussion in 'Java' started by Roman Zhovtulya, Nov 5, 2004.

  1. 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
     
    Roman Zhovtulya, Nov 5, 2004
    #1
    1. Advertising

  2. Roman Zhovtulya

    Maz Rashid Guest

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

    --
    Maz Rashid * http://www.mazcity.de * ICQ 159547510
    --
    "Roman Zhovtulya" <> schrieb im Newsbeitrag
    news:cmgg24$sbh$...
    > 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
     
    Maz Rashid, Nov 5, 2004
    #2
    1. Advertising

  3. Re: Re: Tomcat responce time 10-200 seconds once in a while

    Maz Rashid wrote:
    > 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
     
    Roman Zhovtulya, Nov 6, 2004
    #3
  4. 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
     
    Christian Kalkhoff, Nov 7, 2004
    #4
  5. 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

    ************


    Christian Kalkhoff wrote:
    > 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
     
    Roman Zhovtulya, Nov 7, 2004
    #5
  6. Roman Zhovtulya

    marcus Guest

    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?

    Roman Zhovtulya wrote:
    > 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
     
    marcus, Nov 8, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    7
    Views:
    17,088
    tshad
    Mar 11, 2005
  2. trs
    Replies:
    5
    Views:
    323
    Karl Heinz Buchegger
    Mar 4, 2005
  3. Paul Probert
    Replies:
    9
    Views:
    357
    Roel Schroeven
    Feb 24, 2006
  4. Paul Probert
    Replies:
    13
    Views:
    462
    Magnus Lycka
    Mar 1, 2006
  5. Michael Tan
    Replies:
    32
    Views:
    1,024
    Ara.T.Howard
    Jul 21, 2005
Loading...

Share This Page