# Cached DNS lookups taking significantly longer with newly released Pi-hole FTL v5.9, Web v5.6 and Core v5.4

**URL:** <https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059>\
**Category:** beta\
**Created:** [July 5, 2021, 7:33pm UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059 "2021-07-05T19:33:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![matttt](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@matttt](https://discourse.pi-hole.net/u/matttt)\
**Post date:** [July 5, 2021, 7:33pm UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059/1 "2021-07-05T19:33:32Z")

</div>

One potential issue I want to point out:  
the response time for Cached DNS lookups takes significantly longer than before using this beta. Previously it would show up sub-1ms when cached.  
Now it tends to hover around 5-6 ms, sometimes even reaching over 20 ms. That's a little bit unusual. Currently running it on DietPi 7.3.2 (64bit) + Cloudflared (for DOH on port 5053) on a RPI4 4Gb. Maybe worth looking deeper.

I'm happy to provide logs or a debug code.

---

<div class="post-metadata">

**Author:** ![Skye](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/f475e1/32.png) [@Skye](https://discourse.pi-hole.net/u/Skye)\
**Post date:** [July 5, 2021, 7:35pm UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059/2 "2021-07-05T19:35:46Z")

</div>

Local cache lookups taking much longer than on master branch. On master usually less than .5ms. On beta some are upwards of 70ms, most around 25ms.

---

<div class="post-metadata">

**Author:** ![matttt](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@matttt](https://discourse.pi-hole.net/u/matttt)\
**Post date:** [July 5, 2021, 7:45pm UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059/3 "2021-07-05T19:45:34Z")

</div>

It's good to be able to verify these bugs with others. Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [July 5, 2021, 8:01pm UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059/6 "2021-07-05T20:01:27Z")

</div>

Yes, thanks for your reports. We've seen this and are currently checking where it comes from. The upcoming version embedded `dnsmasq` has still a few bugs as well and Pi-hole users already helped us identifying a quite severe bug which we reported upstream already. It is a subtle bug that manifests in the DNS server believing the upstream DNS server munged a domain name. As this also prevents domains from entering the cache at all (without logging that this happens), it may be that the issue is more widespread and more domains are just never really added to the cache, resulting in queries being incorrectly reported as cached whereas we had to ask upstream. This seems to be the best explanation for the observed behavior.

Could you provide a few examples of such domains from your `/var/log/pihole.log` file? Even when the timestamps are not millisecond accurate, it should show us what happened to the queries.

---

<div class="post-metadata">

**Author:** ![matttt](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@matttt](https://discourse.pi-hole.net/u/matttt)\
**Post date:** [July 5, 2021, 8:17pm UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059/7 "2021-07-05T20:17:28Z")

</div>

Jul 5 22:11:58 dnsmasq[431]: query[type=65] api.overcast.fm from 2a02:  
Jul 5 22:11:58 dnsmasq[431]: cached api.overcast.fm is   
Jul 5 22:11:58 dnsmasq[431]: forwarded api.overcast.fm to 127.0.0.1  
Jul 5 22:11:58 dnsmasq[431]: query[AAAA] api.overcast.fm from 2a02:  
Jul 5 22:11:58 dnsmasq[431]: cached api.overcast.fm is   
Jul 5 22:11:58 dnsmasq[431]: cached overcast.fm is NODATA-IPv6  
Jul 5 22:11:58 dnsmasq[431]: query[A] api.overcast.fm from 2a02:  
Jul 5 22:11:58 dnsmasq[431]: cached api.overcast.fm is   
Jul 5 22:11:58 dnsmasq[431]: cached overcast.fm is 45.79.15.101  
Jul 5 22:11:58 dnsmasq[431]: cached overcast.fm is 45.79.46.187  
Jul 5 22:11:58 dnsmasq[431]: query[AAAA] overcast.fm from 2a02:  
Jul 5 22:11:58 dnsmasq[431]: cached overcast.fm is NODATA-IPv6  
Jul 5 22:12:03 dnsmasq[431]: query[type=65] smoot-searchv2-euc1a.v.aaplimg.com from 2a02:  
Jul 5 22:12:03 dnsmasq[431]: forwarded smoot-searchv2-euc1a.v.aaplimg.com to 127.0.0.1  
Jul 5 22:12:03 dnsmasq[431]: query[AAAA] smoot-searchv2-euc1a.v.aaplimg.com from 2a02:  
Jul 5 22:12:03 dnsmasq[431]: cached smoot-searchv2-euc1a.v.aaplimg.com is NODATA-IPv6  
Jul 5 22:12:06 dnsmasq[431]: query[type=65] clients1.google.com from 2a02:  
Jul 5 22:12:06 dnsmasq[431]: forwarded clients1.google.com to 127.0.0.1  
Jul 5 22:12:06 dnsmasq[431]: query[AAAA] clients1.google.com from 2a02:  
Jul 5 22:12:06 dnsmasq[431]: query[A] clients1.google.com from 2a02:  
Jul 5 22:12:24 dnsmasq[431]: query[type=65] gateway.fe.apple-dns.net from 2a02:908:d86  
Jul 5 22:12:24 dnsmasq[431]: forwarded gateway.fe.apple-dns.net to 127.0.0.1

 ![image](https://discourse.pi-hole.net/uploads/default/original/3X/9/e/9e91f130f1c74358f46501b06917450e30eaec1d.png)

I shortened my IPV6 addresses

---

<div class="post-metadata">

**Author:** ![matttt](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@matttt](https://discourse.pi-hole.net/u/matttt)\
**Post date:** [July 6, 2021, 8:24am UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059/8 "2021-07-06T08:24:32Z")

</div>

Trying out the new FTL update. Improved the lookup time, but not significantly.

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [July 6, 2021, 12:23pm UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059/9 "2021-07-06T12:23:53Z")

</div>

The delay issues should be resolved now, please update and test again if the delay is still an issue for you.

---

<div class="post-metadata">

**Author:** ![matttt](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/m/c37758/32.png) [@matttt](https://discourse.pi-hole.net/u/matttt)\
**Post date:** [July 6, 2021, 12:45pm UTC](https://discourse.pi-hole.net/t/cached-dns-lookups-taking-significantly-longer-with-newly-released-pi-hole-ftl-v5-9-web-v5-6-and-core-v5-4/48059/10 "2021-07-06T12:45:52Z")

</div>

Yes, FTL v5.9, vDev-f31ff95 did solve the cached DNS lookup delay!

Thank you very much 🙂
