Pi-hole shuts itself down constantly

It works fine for a couple of hours but when I check a couple of hours later its unavailable.
I changed the raspberry for a new one and even made a new sd card from scratch but the same happens.

Debug Token:

https://tricorder.pi-hole.net/14dt1bqdps

Thanks for your help.

Things look okay in the debug log. When you see that things are disconnected can you check /var/log/pihole-FTL.log and see if there are any entries that say the daemon was shut down or killed?

Thanks for your reply Dan.

I only have this:

[2019-11-11 08:22:24.158 585] Resizing "/FTL-queries" from 483655680 to 483852288

That was the last line before things disconnected again?

I think it lasts like 6 hours aprox and then it goes off.
Today I disabled the query logging to see if that would change things but still goes down sadly.

The next time you notice that it is off would be the best time to see what that log file says.

Check sudo df -h for available space, and sudo systemctl status --full --no-pager pihole-FTL to see what the state of the daemon is.

Temperature is not visible on your screenshot, but I had a similar problem and it was caused by Pi getting overheated

This are both command while its working:

pi@raspberrypi:~ $ sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  5.8G  8.0G  42% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           464M   40K  463M   1% /dev/shm
tmpfs           464M   12M  452M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   53M  200M  21% /boot
tmpfs            93M     0   93M   0% /run/user/999
tmpfs            93M     0   93M   0% /run/user/1000
pi@raspberrypi:~ $ sudo systemctl status --full --no-pager pihole-FTL
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Tue 2019-11-12 01:34:48 GMT; 2min 36s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 360 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Nov 12 01:34:36 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
Nov 12 01:34:36 raspberrypi pihole-FTL[360]: Not running
Nov 12 01:34:47 raspberrypi su[583]: (to pihole) root on none
Nov 12 01:34:47 raspberrypi su[583]: pam_unix(su:session): session opened for user pihole by (uid=0)
Nov 12 01:34:48 raspberrypi pihole-FTL[360]: FTL started!
Nov 12 01:34:48 raspberrypi su[583]: pam_unix(su:session): session closed for user pihole
Nov 12 01:34:48 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.
pi@raspberrypi:~ $ 

And this are both commands on this morning where it stopped working:

pi@raspberrypi:~ $ sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  5.8G  8.0G  42% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           464M  464M     0 100% /dev/shm
tmpfs           464M   12M  452M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   53M  200M  21% /boot
tmpfs            93M     0   93M   0% /run/user/1000
pi@raspberrypi:~ $ sudo systemctl status --full --no-pager pihole-FTL
● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: active (exited) since Tue 2019-11-12 01:34:48 GMT; 9h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 360 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Nov 12 01:34:36 raspberrypi systemd[1]: Starting LSB: pihole-FTL daemon...
Nov 12 01:34:36 raspberrypi pihole-FTL[360]: Not running
Nov 12 01:34:47 raspberrypi su[583]: (to pihole) root on none
Nov 12 01:34:47 raspberrypi su[583]: pam_unix(su:session): session opened for user pihole by (uid=0)
Nov 12 01:34:48 raspberrypi pihole-FTL[360]: FTL started!
Nov 12 01:34:48 raspberrypi su[583]: pam_unix(su:session): session closed for user pihole
Nov 12 01:34:48 raspberrypi systemd[1]: Started LSB: pihole-FTL daemon.
pi@raspberrypi:~ $ 

@brasofilo temp its 49C. Thanks for your suggestion.

Okay here is the problem.

Before:

Filesystem      Size  Used Avail Use% Mounted on
tmpfs           464M   40K  463M   1% /dev/shm

Crash:

Filesystem      Size  Used Avail Use% Mounted on
tmpfs           464M  464M     0 100% /dev/shm

Pi-hole stores FTL files in shm or Shared Memory. You have no more room in there so it crashes. Is this a Zero? Less than 512M of shm, which uses RAM, is not going to be enough for you.

Nice catch detective!
But its so weird. Its a raspberry pi 3 b+.
I even tried with a brand new raspberry pi 3 b+ I had when I was troubleshooting this.

Indeed a nice catch!
But why... I too am seeing this issue all of a sudden, but in my case after updating Linux a few days ago (after having ignored updating for months and pi-hole running smoothly..).
Running Ubuntu on a VM.

Filesystem                           Size  Used Avail Use% Mounted on
udev                                 348M     0  348M   0% /dev
tmpfs                                 74M  7.1M   67M  10% /run
/dev/mapper/ubumtu--pihole--vg-root   39G  6.8G   30G  19% /
tmpfs                                366M  366M     0 100% /dev/shm
tmpfs                                5.0M     0  5.0M   0% /run/lock
tmpfs                                366M     0  366M   0% /sys/fs/cgroup
/dev/sda1                            472M  103M  346M  23% /boot
tmpfs                                 74M     0   74M   0% /run/user/1000

How much memory are you allocating for the VM? SHM only has 366M available and that's near a quarter of what a Pi has. Bump your RAM allocation to 1G or so.

increased assigned RAM to 1024MB, but space seems to be divided over /dev/shm and /sys/fs/cgroup as both are reading 500MB now.

Honestly the setup has been running without issues for a very long time before the linux update - I do not get why it suddenly starts failing.

Anyway; I think I'll be making a new VM soon; hopefully that will solve this.

It's the same memory space that the two mount points are directed at. /dev/shm and /sys/fs/cgroup are both memory.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.