0

The development server installed by Homebrew is responding slowly to requests. Previously, they were fast. About the time I installed and configured XDebug for the IDE I use, the response times significantly slowed. Now, often 5 seconds or more.

This is occurring in multiple locations on varying wifi connections and all virtual hosts listed in /etc/hosts

EDIT: Page loads and dscacheutil -q host -a name checks experience a perfect 5 second delay before anything loads.

I have tried a number of troubleshooting things, including:

  • Flush cache with sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • Deactivate XDebug (comment all lines of config file)
  • Multiple restarts after the above
% ps -ax | fgrep -i mdns
  253 ??         0:03.06 /usr/sbin/mDNSResponder
  267 ??         0:00.14 /usr/sbin/mDNSResponderHelper
 2071 ttys000    0:00.00 fgrep -i mdns
% ping shorty.local
PING shorty.local (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.153 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.213 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.239 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.201 ms

Through all the troubleshooting, there have been 2 constants:

% host shorty.local
Host shorty.local not found: 3(NXDOMAIN)

     --> (all of the virtual hosts return the same, but have pings similar to above)
% scutil --dns
DNS configuration

resolver #1
  nameserver[0] : 208.67.222.222
  nameserver[1] : 208.67.220.220
  flags    : Request A records, Request AAAA records
  reach    : 0x00000002 (Reachable)

resolver #2
  domain   : local
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300000

resolver #3
  domain   : 254.169.in-addr.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300200

resolver #4
  domain   : 8.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300400

resolver #5
  domain   : 9.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300600

resolver #6
  domain   : a.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 300800

resolver #7
  domain   : b.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)
  order    : 301000

DNS configuration (for scoped queries)

resolver #1
  nameserver[0] : 208.67.222.222
  nameserver[1] : 208.67.220.220
  if_index : 14 (en0)
  flags    : Scoped, Request A records, Request AAAA records
  reach    : 0x00000000 (Not Reachable)

The problem appears to lie in the dns resolvers - #2 thru #7 are Not Reachable. Does #2 need to be reachable for the hosts on localhost to be found?

I have no idea how to fix this. Please offer suggestions!

2
  • 1
    host is a DNS lookup command, it doesn't read /etc/hosts, that's why host shorty.local fails.
    – jaume
    Oct 12, 2022 at 14:54
  • 1
    @jaume I recall reading about nslookup being a poor info source. Your comment prompted me to change the title of this post, because the real problem is slow serving of pages.
    – David C
    Oct 12, 2022 at 15:30

1 Answer 1

2

Found the answer in this superuser question:

DNS resolution delay for entries in /etc/hosts

The issue is due to Bonjour and .local domains.

The solution is to add ::1 shorty.local (etc for other hostnames) to /etc/hosts

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .