1

I'm investigating slow DNS responses on Ubuntu, I have installed bind9 to improve times from local cache, but still something is odd. What could make dig wait for 10 seconds and say that query time took 0?

time dig google.ro +all

; <<>> DiG 9.9.3-rpz2+rl.13214.22-P2-Ubuntu-1:9.9.3.dfsg.P2-4ubuntu1.1 <<>> google.ro +all
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 9665
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.ro.                     IN      A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Feb 17 20:15:19 CET 2014
;; MSG SIZE  rcvd: 38

dig google.ro +all  0.01s user 0.00s system 0% cpu 10.012 total
  • 4
    The status is SERVFAIL, it looks like something is wrong with your DNS server (it doesn't return anything), and 10 seconds is just dig's timeout. – Chris Down Feb 17 '14 at 19:29
  • @ChrisDown thanks for pointing this out. I would accept this as an answer. 0 msec is misleading. – Rumca Feb 17 '14 at 20:04
  • Ubuntu has been shipping dnsmasq and uses it by default, which already gives you a caching name server. I don't think there is anything to be gained by adding another one. – Bananguin Feb 17 '14 at 20:37
  • @Rumca Sure thing, I added it as an answer. – Chris Down Feb 18 '14 at 2:44
1

The status is SERVFAIL, it looks like something is wrong with your DNS server (it doesn't return anything), and 10 seconds is just dig's timeout.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.