2

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
  • 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
    Commented Feb 17, 2014 at 19:29
  • @ChrisDown thanks for pointing this out. I would accept this as an answer. 0 msec is misleading.
    – Rumca
    Commented Feb 17, 2014 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
    Commented Feb 17, 2014 at 20:37
  • @Rumca Sure thing, I added it as an answer.
    – Chris Down
    Commented Feb 18, 2014 at 2:44

1 Answer 1

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.

You must log in to answer this question.

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