Please follow the below template, it will help us to help you!
Expected Behaviour:
I expect the Raspberry Pi to be able to keep functioning while pihole is in use and being queried by clients.
Actual Behaviour:
After some time the complete Raspberry Pi is unresponsive: the SSH session is terminated (packet_write_wait error), and the clients are unable to get to websites. I am also unable to re-establish the ssh connection for quite some time (takes over 15 minutes).
Some additional info: I route my traffic to the RPi by setting the DNS server to the RPi on two of my clients (phone and laptop) so the rest of my household isn't affected by my messing about with their internet connection
Everything looks find in your debug log. When did you generate this debug log? After the longer period of unresponsiveness?
Also, please check the size of your /var/log/pihole.log. The only reason I can think of something like this happening is when the clients are pushing so many queries through that the RPi becomes laggy due to having to write too much to the SD card.
@DL6ER: I had the debug log generated after the longer period of unresponsiveness. Looking in /var/log/ i can actually see several pihole.log files (pihole.log(size: 26872 bytes), pihole.log.1 (size: 786270 bytes), pihole.log.2.gz, pihole.log.3.gz, pihole.log.4.gz, and pihole.log.5.gz).
It also seemed that working with chrome and brave on my laptop was okay, after I opened safari the RPi quickly became unresponsive. Could have been a coincidence though.
So I was trying to fix that open port 53, when all of a sudden the ssh session froze up: seems the RPi is unresponsive again, and there weren't any clients connected. Thought I'd mention it here.
Also good to know (probably): the RPi is only used for pihole. The only software I installed myself is RPI-Monitor.
Is it thermal throttling or do you have a low quality power supply? These all sound like power issues and from the output you show there is not a heavy user load that would cause things to go down. Check with the RPIMon webpage and look at the load factor.