Embedded web server randomly stops responding while DNS continues to work (curl to localhost hangs)

Expected Behaviour:

The integrated Pi-hole web server should always respond to HTTP requests.

The web interface should remain reachable on port 80 for weeks without requiring a restart of the FTL service.

System:

  • Raspberry Pi 3B
  • Raspberry Pi OS (64-bit)
  • Linux 6.18.29+rpt-rpi-v8
  • Pi-hole Core v6.4.2
  • Web v6.5
  • FTL v6.6.2

No reverse proxy, nginx, Apache or Docker is used.
This is a standard Pi-hole installation using the integrated web server.

Actual Behaviour:

After running normally for several days (sometimes weeks), the integrated web server stops responding.

Symptoms:

  • DNS resolution continues to work perfectly.
  • Clients continue using Pi-hole normally.
  • SSH access works.
  • FTL service is still active.
  • Port 80 is still listening.
  • Browser access to /admin times out.

The problem can also be reproduced locally on the Pi itself.

Running

curl -v http://127.0.0.1/

only prints

* Trying 127.0.0.1:80...

and then hangs forever.

The same happens with

curl -v http://127.0.0.1/admin/
curl -v http://127.0.0.1/api/info

No HTTP response is ever returned.

At the same time:

systemctl status pihole-FTL

shows the service is running normally.

ss -tlnp

shows that pihole-FTL is listening on port 80.

Memory usage and CPU load remain completely normal.

Immediately after

sudo systemctl restart pihole-FTL

the web interface starts working again and

curl -v http://127.0.0.1/admin/

returns the expected HTTP 302 redirect.

This issue has now occurred multiple times.

Debug Token:

iw675ctQ

Is there any additional logging or debugging I could enable to help identify why the embedded HTTP server stops responding while the DNS functionality continues working?

Yeah a whole bunch (double TAB for Bash completion):

$ sudo pihole-FTL --config debug.
debug.aliasclients  debug.extra         debug.regex
debug.all           debug.flags         debug.reserved
debug.api           debug.gc            debug.resolver
debug.arp           debug.helper        debug.shmem
debug.caps          debug.inotify       debug.status
debug.clients       debug.locks         debug.timing
debug.config        debug.netlink       debug.tls
debug.database      debug.networking    debug.vectors
debug.dnssec        debug.ntp           debug.webserver
debug.edns0         debug.overtime
debug.events        debug.queries

Eg:

$ sudo pihole-FTL --config debug.webserver
false
$ sudo pihole-FTL --config debug.webserver true
true

That results in verbose logging to:

$ ls -1 /var/log/pihole/webserver.log*
/var/log/pihole/webserver.log
/var/log/pihole/webserver.log.1
/var/log/pihole/webserver.log.2.gz
/var/log/pihole/webserver.log.3.gz

Can use zcat or zless to view those .gz archived files.

Those debugging features are sublime!

Thanks! I have enabled the webserver debug logging as suggested and restarted FTL.

Since the issue only occurs after several days (or maybe weeks) of uptime, I’ll have to wait until it happens again. As soon as it does, I’ll collect the requested logs before restarting FTL and post them here.