FTL keeps crashing .. over and over again

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

FTL to not crash over and over.

Actual Behaviour:

I've tried deleting the FTL DB which allows the "cannot connect to api" message but it just keeps crashing. This is a fresh install as of yesterday or the day before with pihole on a pi 2 revb.

If i delete the FTL db it temp solves the problem but it keeps occurring. Is it a memory issue or something i've done? I have 3 rpi's running pihole because of the consistent crashes I have to ensure I have multiple pi's doing this or I lose internet almost daily.

Debug Token:

https://tricorder.pi-hole.net/yGstvSG9/

You are out of space for shm on your SD card:

*** [ DIAGNOSING ]: Disk usage
   Filesystem      Size  Used Avail Use% Mounted on
   /dev/root       7.1G  1.8G  5.0G  27% /
   devtmpfs        207M     0  207M   0% /dev
   tmpfs           239M  239M   12K 100% /dev/shm
   tmpfs           239M  6.3M  233M   3% /run
   tmpfs           5.0M  4.0K  5.0M   1% /run/lock
   tmpfs           239M     0  239M   0% /sys/fs/cgroup
   /dev/mmcblk0p1  253M   49M  204M  20% /boot

   [2021-11-26 15:21:55.489 17109M] Resizing "FTL-queries" from 249430016 to (5672960 * 44) == 249610240 (/dev/shm: 250.4MB used, 250.4MB total, FTL uses 250.4MB)
   [2021-11-26 15:21:55.491 17109M] WARNING: More than 90% of /dev/shm is used
   [2021-11-26 15:21:55.681 17109M] WARN: Could not fallocate() in realloc_shm() (/__w/FTL/FTL/src/shmem.c:789): No space left on device
   [2021-11-26 15:21:55.682 17109M] FATAL: realloc_shm(): Failed to resize "FTL-queries" (18) to 249610240: No space left on device (28)

This is unusual for this amount of shm. You may have such a query volume that you quickly exhaust this space. From the Pi terminal, what are the outputs of the following commands:

echo ">stats >quit" | nc localhost 471

echo ">top-clients >quit" | nc localhost 4711

echo ">top-domains >quit" | nc localhost 4711

None of those commands give me any output unforunately.

pi@piHole2:~ $ echo ">stats >quit" | nc localhost 471
pi@piHole2:~ $ echo ">top-clients >quit" | nc localhost 4711
pi@piHole2:~ $ echo ">top-domains >quit" | nc localhost 4711
pi@piHole2:~ $

Would the EASY solution be to buy a bigger card or is this an issue more of an internal resource or resources absolutely going batshit and clogging up the allocated space with log entries?

just to keep adding here (sorry) - I have PFsense sending all DNS requests to my 3 pihole pi's. It (for in my mind obvious reasons) the biggest client fwd'ing requests to the pi's. I had to remove the rate limit on the pi's because it kept reaching max and thus causing issues.

I think this is the root of the problem. Your query volume is overcoming the available resources.

I see you have conditional forwarding enabled. This is a common cause for high query volume due to DNS loops. Disable that and see if that resolves the problem.

No.

Yes.

One word of clarification here: Shared memory is highest-speed memory available on the system. In almost all cases, shared memory is configured to be RAM and not SD card. At least, this is the default on all Linux systems I'm aware of.

The Raspberry Pi 2 Mod. B has 1024 GB of RAM available so you could increase the shared memory portion. However, it is likely that you are just doing a lot more than your system can handle so you'd see the exhaustion of memory only a bit later but it'd still happen.

Rate limiting is also meant to save you from this exact situation: You are seeing more queries that your Raspberry Pi's hardware is able to handle. The result is a hard fail.

I see two possible remedies at this time (no 1 preferred as free):

  1. Check why you see the query flooding. @jfb suggested checking out of you have a DNS loop.
  2. When you find that you don't have a loop and the amount of queries is what you expect in your network, you'd have to go to a device with more RAM. This can be either a more expensive Raspberry Pi (you can get the most recent ones with up to 8 GB of RAM) or another device where you can put in up to 32 GB.

will i lose any functionality that way? I like seeing the hosts that are making the requests and I was under the impression this feature is what allows that?

You may lose that function, depending on your router. But, if Pi-hole doesn't run in the first place, it's a moot point. Make the change and see if Pi-hole will stay running.

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