Docker on MacOS Slow DNS Resolution

I'm running pi-hole on Docker on MacOS Ventura.
All works fine except that sometimes it looks like the DNS resolution is slow. I'm saying "DNS resolution" because the internet connection itself is not slow, I've tested it.

I've used a RaspberryPi for many years and I've had no issues of this kind.

Some examples:
Youtube app on Apple TV

  • Open Youtube app
  • The navigation menu has icons and labels
  • Labels are immediately visible while the icons are not visible at first and then are substituted by an ugly placeholder (Youtube may have a timeout limit)
  • Some video preview images are missing
  • Using the app is very difficult

A restart of the Docker fixes the issue immediately.

No need to restart
Sometimes the issue above is automatically fixed without a Docker restart.

Are there logs I can check to understand what's happening?

Thanks!!!

You can look at the query log in your web admin GUI.

There is also a dnsmasq log at /var/log/pihole/pihole.log that contains different details for queries (client, forwarding, reply).

Use these tools to see if Pi-hole is blocking any domains when that app is launched.

Thanks @jfb ,

My understanding is that the network flow is this one:
Home Network > MacMini > Docker > Pi-hole.

I think the slowness is not in the Pi-hole itself, but in "MacMini > Docker".
I'm not sure how to confirm this...

Use Pi-hole's Query Log as jfb suggested.
When you observe slow resolutions, check the Reply column - it shows a time value in milliseconds, representing the time Pi-hole has waited to receive a reply from its upstream.

This value is close to what dig reports for DNS resolution times from a client, e.g. you may see 7.9ms in the Query Log where a client dig reports 11ms, so 3.1ms are added by your network.