I'm using the pihole container with only the following customization to have DNS CACHE set to zero:
sed -i -e "s:CACHE_SIZE=[0-9]\+:CACHE_SIZE=0:g" /etc/.pihole/automated\ install/basic-install.sh
I query the api URL every 10 seconds:
http://{host}:{host_port}/admin/api.php?summary&auth={host_token}
Expected Behaviour:
Being able to retrieve data or use the Web GUI
Actual Behaviour:
Since the last saturday (Jan 21) after updating container image lighttpd stops working after few minutes. Killing the lighttpd process within the container and forcing a restart makes it work again for some minutes.
It does not crash but returns HTTP 503 error.
/var/log/lighttpd/error-pihole.log:
2023-01-24 21:29:59: gw_backend.c.238) establishing connection failed: socket: unix:/run/lighttpd/pihole-php-fastcgi.socket-0: Connection refused
2023-01-24 21:29:59: gw_backend.c.970) all handlers for /admin/api.php?summary&auth= XXXXXX on .php are down.
2023-01-24 21:30:01: gw_backend.c.315) gw-server re-enabled: unix:/run/lighttpd/pihole-php-fastcgi.socket-0 0 /run/lighttpd/pihole-php-fastcgi.socket
2023-01-24 21:31:00: gw_backend.c.238) establishing connection failed: socket: unix:/run/lighttpd/pihole-php-fastcgi.socket-0: Connection refused
2023-01-24 21:31:00: gw_backend.c.970) all handlers for /admin/api.php?summary&auth=XXXXXX on .php are down.
I've updated yesterday the pihole/pihole image to pihole/pihole:2023.01.9 and the problem persists.
We are looking into an issue with the php handlers at the moment over on core. Could you perhaps try editing the file /etc/lighttpd/conf-enabled/15-pihole-admin.conf to have the value min_procs=1 (instead of min_procs=0) and see if that makes a difference?
Hi PromoFaux, I'm almost sure that CUSTOM_CACHE_SIZE wasn't available as option when I first started using pihole container 2 years ago (I can't say I'm sure about it BTW), since I remember that I was using CACHE_SIZE=0 in setupVars.conf on my non-containerized Pi-hole installation and I was wondering how to do the same on the container. I usually read the docs, so I'm guessing it wasn't available at that time (or maybe it was one of the few times I didn't read the docs and tried directly to set an env var CACHE_SIZE in docker and it didn't work) and then I've never checked again since I've found my own solution (BTW, I will move to the official image with the CUSTOM_CACHE_SIZE env var which is what I need and I'll update my giannicostanzi/pihole-nocache page on Docker Hub saying it is no longer necessary to run my custom image in order to force CACHE_SIZE to zero ).
I've made your change, I'll update tomorrow if it crashes (I have telegram notifications if it stops answering to api calls, let's see how long it will last since 22:38 Jan 24)
Lighttpd is still fine. Should I try restoring min-props to 0 to see if the problem comes back? I'll wait before moving to the official image since now I've included the lighttpd tuning in my own dockerfile.
FROM pihole/pihole:latest
#RUN sed -i -e "s:CACHE_SIZE=[0-9]\+:CACHE_SIZE=0:g" /etc/.pihole/automated\ install/basic-install.sh
RUN sed -i -e 's:min-procs" => 0:min-procs" => 1:g' /etc/lighttpd/conf-enabled/15-pihole-admin.conf