Return-Path: Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 5334 invoked from network); 7 Jul 2003 13:22:25 -0000 Received: from outhub1.tibco.com (63.100.100.155) by daedalus.apache.org with SMTP; 7 Jul 2003 13:22:25 -0000 Received: from unknown(10.106.128.33) by outhub1.tibco.com via csmap id 5531; Mon, 07 Jul 2003 06:19:19 -0700 (PDT) Received: from mail1.tibco.com (nsmail2.tibco.com [10.106.128.42]) by na-h-inhub1.tibco.com (8.12.9/8.12.9) with ESMTP id h67DMPHG004714 for ; Mon, 7 Jul 2003 06:22:25 -0700 (PDT) Received: from tibco.com ([10.98.32.36]) by mail1.tibco.com (Netscape Messaging Server 4.15) with ESMTP id HHNP5300.US0 for ; Mon, 7 Jul 2003 06:22:15 -0700 Message-ID: <3F097441.2030207@tibco.com> Date: Mon, 07 Jul 2003 09:23:13 -0400 From: "Eric Johnson" Organization: TIBCO Extensibility User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Commons HttpClient Project Subject: Re: Occassional long download times References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Michael, You might try turning on the wire and/or trace logging (which sounds like it might generate a lot of data), but it would also tell you exactly where the delay occurs. Knowing where the culprit occurs would provide additional detail that might clearly identify whether the problem lies with HttpClient or the network. -Eric. Michael Mattox wrote: >I'm experiencing something weird and I just want to see if anyone else has >experienced it, and if it may be something I'm doing. Basically my >application is monitoring 700+ websites every 5 minutes and timing the time >it takes to connect and download. The main goal is to verify the site is >working, so I don't need exact precision on the times. Here's some of my >code to time the download: > >method = new GetMethod(uri.toString()); >method.setFollowRedirects(true); >method.setHttp11(false); >DefaultMethodRetryHandler retry = new DefaultMethodRetryHandler(); >retry.setRequestSentRetryEnabled(true); >retry.setRetryCount(3); >method.setMethodRetryHandler(retry); > >start = System.currentTimeMillis(); >method.execute(state, connection); >msi.setDuration(System.currentTimeMillis() - start); > > >What I see is that normally I get download times 150ms and then >occassionally (4-5 times a day) I see a download time of 3000ms. It happens >to the majority of the websites, so I do not believe it's a particular site. >So it must be either my application, or the network. My application uses a >thread pool and always has multiple threads running (typically 8 at a time >on a 4 CPU machine that's also running tomcat and Postgres), and I've seen >that at exactly the same time a website has a 3000ms download time several >others have normal 150ms times. So this seems to rule out the network. I >set my threads to be all MAX_PRIORITY to minimize the interruptions. Are >there any other explanations? Any ideas what I can do about it? My current >thought is to put in some code to say if the download time is more than 10x >the previous time then repeat the download to make sure. This way our >customers wouldn't see the huge spike in the numbers, but at the same time >if that spike really should be there I don't want to cover it up. > >Thanks, >Michael > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org >For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org > > > > >