BIND 9 very slow to resolve after upgrading from earlier version

Jason Vas Dias jvdias at redhat.com
Mon Dec 20 21:25:07 UTC 2004


On Mon, 2004-12-20 at 15:51, James Herbert wrote:
> Mxsmanic wrote:
> > I just upgraded to FreeBSD 5.3 and BIND 9, and I'm using the same BIND
> > config files I used previously, but now named is taking forever to
> > resolve addresses (like ten seconds).  What sorts of problems with the
> > config could account for this?
> 
> Well,
> 
> I had these symptoms on OpenBSD. The fix for my problem is described here:
> 
> http://www.openbsd.org/errata.html
> 
> (RELIABILITY FIX 002)
> 
> It's due to BIND trying to use IPv6 even when there is no IPv6 
> connectivity. This may be your issue, but then again it may not. Try 
> asking the FreeBSD people?
> 
> ymmv, hth etc.
> 
> -j
> 
> 
There's a patch for this issue which I put in the latest BIND 9.3.0 for
Red Hat 
(ftp://download.fedora.redhat.com:/pub/fedora/linux/core/development/SRPMS/bind-9.3.0-1.src.rpm
)
against the latest BIND-9.3.0 source, which is:

 --- bind-9.3.0/lib/dns/resolver.c.handle_send_errors    2004-08-28
02:25:19.000000000 -0400
+++ bind-9.3.0/lib/dns/resolver.c       2004-11-24 18:40:24.024030000
-0500
@@ -792,7 +792,19 @@
                        resquery_destroy(&query);
                }
        } else if (sevent->result != ISC_R_SUCCESS)
+       {
+               switch (sevent->result)
+               {/* handle "fatal" send errors by firing timer sooner:
*/
+               case ISC_R_NETUNREACH:
+               case ISC_R_HOSTUNREACH:
+               case ISC_R_CONNREFUSED:
+               case ISC_R_NOPERM:
+               case ISC_R_ADDRNOTAVAIL:
+                   isc_interval_set(&(query->fctx->interval), 0, 100);
+                   fctx_startidletimer(query->fctx);
+               }
                fctx_cancelquery(&query, NULL, NULL, ISC_FALSE);
+       }

        isc_event_free(&event);
 }



More information about the bind-users mailing list