DNS goes offline after a few hours

I think I will completely reinstall my pihole and see if the problem persists. Maybe sth went wrong during the update from V4 to V5.

sth I forgot to mention. I also use log2ram. could this also interfer?

I don’t know if your PiHole issue is related to Log2RAM at all, but that software is having issues with deleting data/folders from var/log and changing permissions to “Read Only”. I’d stay away from it till a fix is published.

ok that explains why I so often get "permission denied" errors... As I said I will reinstall my pi without log2ram and will give feedback. Once again thx to all who helped here. Really a great community!

Starting fresh with a major update like 5.0 is never a bad idea anyway. I was forced to do the same after having a custom theme on version 4 that caused update issues. Was up and running with a new installation and backup in a matter of minutes. Good luck.

I completely reinstalled my pi today. Even reflashing the latest Raspbian to my SD Card. This time without log2ram. But the problem still persits :frowning:
Any ideas?

Worked fine for about 9 hours:

After reboot everything looks fine again:

As a workaround try to change the upstream DNS-Server. In the past Cloudflair did not always adhere exactly to the DNS protocol causing pihole to crash.

I just changed to OpenDNS. Lets see if that helps.

Sidenotes: As I already mentioned above, when this issue occurs the pi webadmin interface is super slow. Also I just checked pihole -t and although it says "DNS Offline", resolution still seems to work (at least partially):

It is actually very strange that I'm not encountering this crash, even though I try hard. Could you maybe again share all the details you think are relevant to the issue? Maybe I cannot reproduce because this is triggered by some special combination of some queries in a specific order. Like with these Microsoft Office crashes.

This does absolutely not look like a crash. FTL is still running absolutely fine and smooth when this is the only thing you see. Very obscure.

Is it still the same crash in the log?


Let's see what happens with OpenDNS. Next step would then be to try removing Log2RAM

Hey DL6ER. I completely reflashed my pi yesterday (without log2ram).

I have read that especially with DoH and DNSSEC enabled in combination with Cloudflare there can be issues sometimes. But this was with an older version of pihole. And it worked for me personally for a few months without any problems. My setup right now:

  • pihole 5
  • no DoH
  • no log2ram
  • DNSSEC enabled
  • DNS Provider: OpenDNS

In case it crashes again I will do another screening session with gdb. And if it doesn't crash that would definitely point to Cloudflare.

Since I switched to OpenDNS and disabled DoH my pi works like a charm. No crash so far.

Next thing I will test:

  • Switch to Cloudflare DNS without DoH to see if problems reoccurs.
  • If this works I will enable DoH again to see if the issue is DoH related.

Cheers and so many thanks for your support guys!

I switched to Cloudflare (without DoH) and still no crash of DNS service. So I guess the issue is DoH related. I configured DoH according to this guide: Redirecting...

Just in case someone stumbles over the same problem: Simply disable DoH.

Small update:

I have seen that there is an update available for Cloudflared. I have just updated to the latest version and re-enabled DoH. Lets see how it goes. If you don't hear anything from me again it means that everything is fine now. Otherwise I will report it here :slight_smile:

Well, it would still be nice to be able to fix the underlying error. If you can regenerate a configuration that is causing the issue, I will look at putting up a dedicated device just for trying to squash this bug. We want to offer highest-quality software, not workarounds :slight_smile:

Ok. So this definitely seems to be related to DoH or Cloudflared. Enabled it yesterday and the error reoccured.

Can you describe exactly how you did it? Like linking to a tutorial you used, etc.?

Yes I posted the guide that I used a little bit above (5 posts above I believe).
PS: I did it the manual way, not the automatic variant which is also described in that post

Oh, I missed that. That's the price for looking at too many discussions one after another. I should rather stay focused. I just set up a virtual machine and the installation is running. Fingers crossed I can get it to crash :slight_smile:

edit
Noted during the installation process:

# sudo apt-get install ./cloudflared-stable-linux-amd64.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done

Note, selecting 'cloudflared' instead of './cloudflared-stable-linux-amd64.deb'
The following NEW packages will be installed:
  cloudflared

edit 2
Installed, debugger attached, waiting for it to crash.

@LPanic Are you aware of a specific domain that got queried which triggered the crash? I run several thousand queries against typical blocked and not-blocked queries, so far, everything works fine.

Don't worry. I know how that goes somtimes :slight_smile: I am really curious if you can reproduce the issue.