Hi,
Simple setup here.
10.04 Server running BIND to provide DNS (no forwarders in the config, so querying root servers) to usually one 12.04 Desktop client. The 12.04 client has had dnsmasq removed so all DNS lookups go to the BIND server.
I'm seeing long DNS lookup delays in applications on the 12.04 client when querying DNS after a period of inactivity on the client. e.g. Firefox will sit for upto 5 seconds with a status of "Looking up host xxxxxxxxx" before getting the response then displaying the page.
Initially I thought it was to do with TTLs and caching so turned to dig using a domain that has a low TTL... first is right after I accessed the site, the second after the TTL expired - so 3msec and 138msec are not unreasonable for a cached and non-cached response respectively.
Code:
crypto@ubulaptop1204:~$ date && dig roguevampires.net
Sat Jun 30 05:54:10 BST 2012
; <<>> DiG 9.8.1-P1 <<>> roguevampires.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13650
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;roguevampires.net. IN A
;; ANSWER SECTION:
roguevampires.net. 542 IN A 213.175.213.194
;; AUTHORITY SECTION:
roguevampires.net. 542 IN NS ns1.impulsiveimagination.com.
roguevampires.net. 542 IN NS ns2.impulsiveimagination.com.
;; ADDITIONAL SECTION:
ns1.impulsiveimagination.com. 542 IN A 213.175.213.194
ns2.impulsiveimagination.com. 542 IN A 213.175.213.195
;; Query time: 3 msec
;; SERVER: 192.168.1.67#53(192.168.1.67)
;; WHEN: Sat Jun 30 05:54:10 2012
;; MSG SIZE rcvd: 143
crypto@ubulaptop1204:~$ date && dig roguevampires.net
Sat Jun 30 06:17:57 BST 2012
; <<>> DiG 9.8.1-P1 <<>> roguevampires.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24277
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;roguevampires.net. IN A
;; ANSWER SECTION:
roguevampires.net. 600 IN A 213.175.213.194
;; AUTHORITY SECTION:
roguevampires.net. 600 IN NS ns2.impulsiveimagination.com.
roguevampires.net. 600 IN NS ns1.impulsiveimagination.com.
;; ADDITIONAL SECTION:
ns1.impulsiveimagination.com. 600 IN A 213.175.213.194
ns2.impulsiveimagination.com. 600 IN A 213.175.213.195
;; Query time: 138 msec
;; SERVER: 192.168.1.67#53(192.168.1.67)
;; WHEN: Sat Jun 30 06:17:57 2012
;; MSG SIZE rcvd: 143
So - not really the time the lookup takes that is delaying things.
If I leave the client idle for an hour or so and do a dig from a terminal there is a 5 - 10 second delay and then the response comes back saying the lookup took ~150msec.
I'm at a loss as to whether this is BIND on the server going to sleep or the server as a whole is dozing off.
What can I check for either sleepy settings on the server or BIND specifically?
Thanks for reading my rambling
Bookmarks