DNS stops working randomly

If you still have the debug log created when you saw the error, run:

cat /var/log/pihole/pihole_debug.log | pihole tricorder

This will upload your last debug log.