Cannot perform DNS queries via Pihole at first attempt

Expected Behaviour:

Reference Guide: Post-Install - Pi-hole documentation

Running Unbound on Pihole server

$ sudo systemctl status unbound
* unbound.service - Unbound DNS server
     Loaded: loaded (/lib/systemd/system/unbound.service; enabled; preset: enab>
     Active: active (running) since Wed 2025-04-09 14:10:49 CDT; 3 days ago

Having DNS issues:
First client request for a specific FQDN always fails
Subsequent attempts generally work
Refreshing this page boots me out of the page (happens after a few minutes)
Something wrong with my DNS settings on the Pihole server. Please HELP.

$ pihole -v
Core version is v6.0.3 (Latest: N/A)
Web version is v6.0.1 (Latest: v6.1)
FTL version is v6.0.1 (Latest: v6.1)
  • Operating System (Family and Version) Debian GNU/Linux 12 (bookworm) aarch64
  • Hardware Raspberry Pi 3 Model B Plus Rev 1.3
  • Docker compose file or Docker run command n/a
  • Docker engine version n/a

Custom DNS:

127.0.0.1#5335
8.8.8.8
208.67.220.220
CPU: 21.8% (load: 0.87 1.07 1.16) on 4 cores running 218 processes (48.9% used by FTL)
RAM: 46.3% of 0.9 GB is used (30.7% used by FTL)
Swap: 99.9% of 0.2 GB is used
Kernel: Linux raspbari25 6.1.69-v8+ #1711 SMP PREEMPT Thu Dec 21 14:27:49 GMT 2023 aarch64
Uptime: 4 days (running since Wednesday, April 9th 2025, 14:09:20)
FTL: PID 683, last restart was on Saturday, April 12th 2025, 15:09:30
 unbound.service - Unbound DNS server
     Loaded: loaded (/lib/systemd/system/unbound.service; enabled; preset: enabled)
     Active: active (running) since Wed 2025-04-09 14:10:49 CDT; 3 days ago
       Docs: man:unbound(8)
    Process: 1429 ExecStartPre=/usr/libexec/unbound-helper chroot_setup (code=exited, status=0/SUCCESS)
    Process: 1432 ExecStartPre=/usr/libexec/unbound-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
   Main PID: 1434 (unbound)
      Tasks: 1 (limit: 777)
        CPU: 3min 24.989s
     CGroup: /system.slice/unbound.service
             `-1434 /usr/sbin/unbound -d -p

Apr 09 14:10:49 raspbari25 systemd[1]: Starting unbound.service - Unbound DNS server...
Apr 09 14:10:49 raspbari25 unbound[1434]: [1434:0] **warning: subnetcache: prefetch is set but not working for data originating from the subnet module cache.**
Apr 09 14:10:49 raspbari25 unbound[1434]: [1434:0] info: start of service (unbound 1.17.1).
Apr 09 14:10:49 raspbari25 systemd[1]: Started unbound.service - Unbound DNS server.

Actual Behaviour:

$ sudo pihole -up
  [✓] Supported OS detected
  [✓] Update local cache of available packages
  [✓] Building dependency package pihole-meta.deb
  [✓] Installing Pi-hole dependency package

  [i] Checking for updates...
fatal: unable to access 'https://github.com/pi-hole/pi-hole.git/': Could not resolve host: github.com

  Error: **Unable to update local repository.** Contact Pi-hole Support.

$ ping github.com
PING github.com (140.82.114.4) 56(84) bytes of data.
64 bytes from lb-140-82-114-4-iad.github.com (140.82.114.4): icmp_seq=1 ttl=241 time=36.6 ms
64 bytes from lb-140-82-114-4-iad.github.com (140.82.114.4): icmp_seq=2 ttl=241 time=36.2 ms
^C
--- github.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 36.166/36.391/36.616/0.225 ms

## Debug Token:

[✗] **There was an error uploading your debug log.**
   * Please try again or contact the Pi-hole team for assistance.
   * A local copy of the debug log can be found at: /var/log/pihole/pihole_debug.log