From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: bug#20816: Excessive negative cache time for DNS lookups Date: Mon, 15 Jun 2015 09:15:27 -0400 Message-ID: References: <87si9titcm.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4UFE-0007c9-4S for bug-guix@gnu.org; Mon, 15 Jun 2015 09:16:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4UF9-0004DK-U6 for bug-guix@gnu.org; Mon, 15 Jun 2015 09:16:08 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:40012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4UF9-0004DF-FW for bug-guix@gnu.org; Mon, 15 Jun 2015 09:16:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z4UF9-0004OE-1S for bug-guix@gnu.org; Mon, 15 Jun 2015 09:16:03 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87si9titcm.fsf@netris.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: 20816@debbugs.gnu.org On Sun, Jun 14, 2015 at 10:43 PM, Mark H Weaver wrote: > On my GuixSD system, DNS lookup failures (due to lack of network) are > cached for at least 4 minutes, and possibly much longer (I've not had > the patience to wait until it expires). > > Even after restarting nscd, the negative cache entry persists for about > another 20 seconds. > > I run into this problem quite frequently after waking my system up from > suspend-to-ram. It typically takes several seconds for wicd to > establish a network connection, and if I make the mistake of triggering > a name lookup of my server (world.peace.net), then I must do the > following: > > (1) deco restart nscd > (2) wait about 20 seconds > > Looking at %nscd-default-caches in (gnu services base), I see that the > intent is to cache host lookup failures for 20 seconds, and service > lookup failures for an hour. The fact that the negative cache entry > persists for 20 seconds after restarting nscd would seem to indicate > that nscd considers this to be a host lookup. So perhaps this is a bug > in nscd. > > Is anyone else able to reproduce this problem? Yes, I had this exact same issue on Friday after having wireless network connectivity problems. - Dave