500 Internal Server Error, pihole works, ping works, SSH does not

As per title, this issue has been posted about a bunch of times. I see no solutions. After some period of time the web ui starts throwing 500 and whilst it can be pinged it can't be SSHed or anything else. Restarting solves the issue but this can only be done by replugging the pi it's running on.

I use a USB SSD but others report this happening with an SD card. Can we please work together to find the root cause and get this fixed because it's a pain in the arse. I use this pi to send WoL packets too so it's a bit frustrating that it keeps happening.

Expected Behaviour:

On web interface no 500 Internal Server Error, pihole works, ping works, SSH works

Actual Behaviour:

On web interface 500 Internal Server Error, pihole works, ping works, SSH does not

Debug Token:

I can't provide due to the nature of the issue

What's the exact command used to ssh into your Pi-hole host machine?
What's the error message when it fails?

I normally use Termius for iOS, Putty or the iOS shortcuts app.

For Termius the error is as shown:

For Siri Shortcuts it’s this:

Since your screenshots show direct IP connects, Pi-hole isn't involved.

Instead, this suggests a network connectivity issue.

How is the machine hosting Pi-hole connected to your network, wired or wireless?