FTL.php causes crash

Expected Behaviour:

to not get spammed with msg "FastCGI-stderr: PHP Warning: socket_read(): unable to read from socket [104]: Connection reset by peer in /var/www/html/admin/scripts/pi-hole/php/FTL.php on line 107"

Actual Behaviour:

/var/log/lightttpd/error.log is full of the message above until the disk is full and many services including pihole are crashing

note: the debug token is during the short time after a restart where the problem is NOT existent, because I cant generate a token afterwards

Debug Token:

lcnywk97dm

@devs: there is a report with the same message and same behavior in the german help section

1 Like

danke dir @mibere :slight_smile:

however it seems pihole is the only one listening to tcp 4711

netstat -tuple | grep 4711
tcp 0 0 localhost:4711 0.0.0.0:* LISTEN pihole 13134 776/pihole-FTL
tcp6 0 0 localhost:4711 [::]:* LISTEN pihole 13139 776/pihole-FTL

// maybe this helps a bit

/var/log/pihole-FTL.log

[2018-04-03 18:56:42.394] Listening on port 4711 for incoming IPv4 telnet connections
[2018-04-03 18:56:42.395] Listening on port 4711 for incoming IPv6 telnet connections
[2018-04-03 18:56:42.395] Listening on Unix socket
[2018-04-03 18:56:42.396] WARN: failed to read /etc/pihole/numBlocked
[2018-04-03 18:56:42.463] Gravity list entries: 513264
[2018-04-03 18:56:42.463] Notice: Increasing wildcards struct size from 0 to 100 (1.38 MB)
[2018-04-03 18:56:42.463] Wildcard blocking list entries: 9
[2018-04-03 19:02:18.795] Client denied (at max capacity of 40): 44
[2018-04-03 19:02:18.795] IPv4 telnet error: Success (0)
[2018-04-03 19:02:48.917] Client denied (at max capacity of 40): 44
[2018-04-03 19:02:48.917] IPv4 telnet error: Success (0)
[2018-04-03 19:10:16.794] Client denied (at max capacity of 40): 45
[2018-04-03 19:10:16.795] IPv4 telnet error: Success (0)
[2018-04-03 19:10:47.036] Client denied (at max capacity of 40): 45
[2018-04-03 19:10:47.036] IPv4 telnet error: Success (0)
[2018-04-03 19:11:17.163] Client denied (at max capacity of 40): 45

Oh .... How heavily loaded is the machine this Pi-hole is running on? I'd guess that there are either dozens of daemons offering services or there is at least one daemon that is very wasteful with file handles.

You are trying FTLDNS? I will push a fix (increase the maximum capacity from 40 to 255) therein.

EDIT: Done

2 Likes

sorry - this is another account, but I'm the OP :slight_smile:
the mashine isnt doing anything apart from pihole and dnscrypt-proxy - its a dedicated vm only for this purpose. It could give it more ressources but I guess it should be sufficent already

root@piDNS:/home/strn# free
total used free shared buff/cache available
Mem: 504260 198232 8680 18436 297348 274708
Swap: 0 0 0

top - 13:01:35 up 1:57, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 143 total, 1 running, 142 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.2 us, 0.3 sy, 0.0 ni, 98.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 504260 total, 8804 free, 198340 used, 297116 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 274776 avail Mem

could it be related to the fact that I've mounted /var/log to a ramfs?

Actually I don't know what is the cause for such a high number of open file descriptors, maybe it is cause by your VM? Anyhow, can you confirm that it is fixed in the most recent version?

is there a way to display the actual file descriptors and its related processes or something like that?
It is working at the moment, I'll give an update here if (or when) its failing again

edit: by the way, I've commented #log-facility=/var/log/pihole.log in /etc/dnsmasq.d/01-pihole.conf because I'm sending the log to an external logstash server. Is FTL somehow dependend on the actual content of /var/log/pihole.log (because it is empty as everything gets to /var/log/syslog)

Sorry, I missed you question here. No, we do not depend on anything here. You are free to send them somewhere else or completely disable them with FTLDNS.

We can look into this more closely if you are again experiencing errors.

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