[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] HTTP Test Timeout & Delays
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] HTTP Test Timeout & Delays
- From: "Ralph Mitchell" <ralphmitchell (at) gmail.com>
- Date: Fri, 17 Nov 2006 04:41:34 -0600
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Uj6ZXgfdZb/llnllhECA5UFm9WCLRHsoKL3fA5NFU/T816b/5qPnzMQtNxqDgRIrfCVhAwbvOoRG0Ibg85cVIs+EVRGquKp2JJWtv7iHRB2YJg3NO3IprdsGm3Xu5+KYQjQCGEkp/p35ESc27p1y+MxlzWJMQ5QyHifVhGbZcVQ=
- References: <024a01c70994$59dbb810$6b2fb8a5@txaccess.net> <20061117081406.GB7674@hswn.dk> <A10A7B9E-9AFA-4592-BB1D-8DB3FA8A03DE@leyton.org>
On 11/17/06, Richard Leyton <richard (at) leyton.org> wrote:
So we upped the default timeout on bbtest-net to 20s, which helped
but it's still not really enough, and I'm reluctant to increase it
further the board for just one bad egg. If there's a workaround to
this particular problem, I'd be happy to hear suggestions.
You could try doing what I do, and run an external script to grab the
page. I use curl to actually fetch web pages. Here's a minimal
script to give you an idea:
#!/bin/sh
TIMEOUT=60 # give up after 60 seconds
COOKIES=/tmp/cookies
CURLOPTS="-s -S -L -b $COOKIES -c $COOKIES -m $TIMEOUT"
TEST=http
curl $CURLOPTS -o /tmp/page.html http://server.domain.com
ret=$?
if [ "$ret" -ne "0" ]; then
MESSAGE="Something broke. Curl code: $ret"
COLOR=red
else
MESSAGE="Everything is peachy keen!"
COLOR=green
fi
LINE="status $MACHINE.$TEST $COLOR `date`
$MESSAGE"
$BB $BBDISP "$LINE"
You can also examine the page for "interesting stuff", such as text
that wouldn't appear if the server is broken, or text that shouldn't
appear if it's working fine. Curl also handles secure servers,
proxies, several different authentication mechanisms, and can give you
timing information if you want it for graphs.
Ralph Mitchell