Re: dnsserver and always_keepalive.

From: Duane Wessels <wessels@dont-contact.us>
Date: Fri, 6 Aug 1999 15:22:42 -0600

On Thu, 5 Aug 1999, Scott Hess wrote:
 
> A couple hours after turning this on, squid reported in the error logs that
> it got a timeout reading from a dnsserver, and that the dnsserver in
> question had exitted. For the next fifteen minutes, it served up pages with
> status 504, 503, and 000. 000! The error logs look like:
>
> Aug 4 15:26:52 www squid[219]: helperHandleRead: FD 6 read: (60) Operation
> timed out
> Aug 4 15:26:52 www squid[219]: WARNING: dnsserver #1 (FD 6) exited
> Aug 4 15:41:54 www squid[219]: ipcache_nbgethostbyname: 'ui.avantgo.com'
> PENDING for 902 seconds, aborting
> Aug 4 15:41:54 www squid[219]: ipcacheChangeKey: from 'ui.avantgo.com' to
> '1/ui.avantgo.com'

Given that you've established a relationship between enabling TCP
keepalive and this happening, I don't find these messages too
surprising.

I'm a little surprised that turning on keepalives caused the dnsserver
to exit. The TCP connection is definately established. I don't see
why keepalives cause this.

> Also, I notice that as of right now, it's only got a single dnsserver
> process, though it's configured for 5. There are no messages regarding

Ok, so we can assume that the other four got disconnected somehow
because of the keepalives. Probably the rate at which Squid looks up
DNS names is so low (at this point in time) that only one of the
dnsservers is required.

> Second question - why doesn't squid catch the dead dnsservers earlier?
> Obviously a number of them have died, but squid hasn't logged the fact.

Squid only reads from the dnsserver socket when its waiting for
an answer. When the DNS server is sitting idle, Squid does not
"select" on that filedescriptor for reading. So we wouldn't get
the error until we try to write to it.

> Third question - why, when it saw that the dnsserver had died, did squid
> lose it's mind?

Squid lost its mind?

Which one is "the dnsserver"? You said that 4 of 5 exited, but
things kept on working.

> [I know, I know, upgrade to a later version. But the current version has
> run fine for a long time, and until now we've had zero problems attributed
> to squid (I attribute the CLOSING sockets to the OS). Besides, I don't want
> to upgrade unless this is a problem likely to be fixed by the upgrade.]

A newer version may have helped a little. In recent versions the
whole Squid process exits (and restarts, presumably) if half of
the dnsserver (or redirector) processes die.

Also note that in version 2.3, there are no more dnsserver processes :-).
Squid will do native DNS queries all by itself.

Duane W.
Received on Fri Aug 06 1999 - 15:04:16 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:47:52 MST