Latest Pi-Hole has a memory leak?

Hi,

When I start pihole-FTL , CPU increase and memory usage increase quickly up til it starts to swap and the raspberry become extremely slow.

I had to stop pihole to keep control over my Pi.

I use latest raspbian : 9 (stretch) (installed over the week end)

and latest pi-hole installed over the week end also

I checked what could be done and it seems it starts become worst after adding more Ad list, so I dropped all of them :

root@raspberrypi:/etc/pihole# ls -altr
-rw-r--r-- 1 root root 67895045 Nov 18 02:03 gravity.list
root@raspberrypi:/etc/pihole# > gravity.list
root@raspberrypi:/etc/pihole# systemctl start pihole-FTL

then updated gravity again and checked memory, it seems better, but I am pretty sure this is just because there are far less server to block :

[✓] Your debug token is: qrwhgcmn7p

Looking at your Debug i see very little to concern me or make me think there is something amiss with your setup.

Which version of Raspberry Pi is this on?

You could change blocking modes within your FTL config to NXDOMAIN as the NULL blocking mode forces us to store all domains twice, once for IPv4 and once for v6. Blocking mode - Pi-hole documentation

How many domains were being blocked when you had the higher memory use?

If your first screen shot was taken with more domains in gravity and higher memory use, you were still only using about 72% of memory.

I use raspberry pi one

[✓] Extracting domains from blocklists
[i] Number of domains being pulled in by gravity: 3362811
[i] Removing duplicate domains...

I gave a try to nxdomain instead of null,i'll let you know the result. thanks for your quick answers !!

CPU and mem usage are going up

With that many domains being blocked, there is an increased memory load and you are using a Pi with the least amount of memory (I recall that model has 256K {Edit - 256M} RAM).

There is not a memory leak, just a large memory load.

Well it is not kilobytes but it is 256 MegaBytes.

Anyway if an name server is 73 bytes long, indeed we got 245 megabytes of memory for storing the list of server :cry:

I'll order a Pi 3, with 1GB that should be OK :slight_smile:

Would be nice if a memory check limit was available to prevent loading more than what's possible.

Thanks for your help !

Just a small note that this will be fixed with v4.2 when NULL will use exactly the same amount of memory as NXDOMAIN does right now. Due to more testing that needs to be done, this will unfortunately not be released with the upcoming v4.1.

1 Like

I have drastically reduced the amount of host source :

$ cat adlists.list
http://winhelp2002.mvps.org/hosts.txt
https://adaway.org/hosts.txt
$ wc -l gravity.list
12813 gravity.list

and it is now working perfectly :slight_smile:

Debug output here : [✓] Your debug token is: b12wxzpx4h

Thanks for your help !

Got my Pi 3 B+ yesterday :slight_smile:

It is much more powerful !

I used the same list of server I tried first :

Is this a bug the percentage of blocked queries ?

I have discovered with Pi-hole that a chinese camera was contacting chinese server all the time, that's crazy !

That is a known bug. Will be fixed next release.

3 Likes