From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#20816: Excessive negative cache time for DNS lookups Date: Sun, 14 Jun 2015 22:43:53 -0400 Message-ID: <87si9titcm.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4KOb-000126-Ex for bug-guix@gnu.org; Sun, 14 Jun 2015 22:45:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4KOW-0006zH-Cf for bug-guix@gnu.org; Sun, 14 Jun 2015 22:45:09 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:39687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4KOW-0006yq-8w for bug-guix@gnu.org; Sun, 14 Jun 2015 22:45:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z4KOV-00053i-Sd for bug-guix@gnu.org; Sun, 14 Jun 2015 22:45:04 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4KNf-00008P-Rk for bug-guix@gnu.org; Sun, 14 Jun 2015 22:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4KNY-0006fz-Rt for bug-guix@gnu.org; Sun, 14 Jun 2015 22:44:11 -0400 Received: from world.peace.net ([50.252.239.5]:53440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4KNY-0006fp-OH for bug-guix@gnu.org; Sun, 14 Jun 2015 22:44:04 -0400 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: 20816@debbugs.gnu.org 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? Mark