DNS goes down and needs a long time to resize/remap tables

pi@server-piholebal:~ $ ls -la /var/log/pihole/pihole*
-rw-r----- 1 root   pihole      38,904 jun 14 08:21 /var/log/pihole/pihole_debug.log
-rw-r----- 1 pihole pihole  12,000,534 jun 27 09:27 /var/log/pihole/pihole.log
-rw-r----- 1 pihole pihole 178,032,724 jun 27 00:00 /var/log/pihole/pihole.log.1
-rw-r----- 1 pihole pihole  21,379,517 jun 26 00:00 /var/log/pihole/pihole.log.2.gz
-rw-r----- 1 pihole pihole  17,643,881 jun 25 00:00 /var/log/pihole/pihole.log.3.gz
-rw-r----- 1 pihole pihole  26,259,995 jun 24 00:00 /var/log/pihole/pihole.log.4.gz
-rw-r----- 1 pihole pihole  30,509,449 jun 23 00:00 /var/log/pihole/pihole.log.5.gz
-rw-r--r-- 1 root   root        1,914 jun 25 03:51 /var/log/pihole/pihole_updateGravity.log

BUT I flushed logs before restarting the dns otherwise the people have no internet for over half an hour again.

Looks like your logs are rotating as expected.

The previous debug log has expired. Please provide a new one.
Do not delete/flush logs or restart the VM before running the log.
This will show the current state of your Pi-hole and it will tell us if there is a storage problem.

Also, when DL6ER asked about the hardware you explained Pi-hole runs on a VM. How much memory this VM uses?

I will provide another log when it hangs again.

the VM has 1Gb of memory and currently only 377Mb in use.

When that happend, did you also observe:

And also, have you been able to trigger that warning using nslookups for unknown domains as suggested earlier?

Tailing logs (e.g. by pihole -t) is meant as a short term measure, useful e.g. when you actively watch the logs. That's especially true if log files are rotated regularly (as is the case for Pi-hole's logs).
Note that I did suggest running pihole -t in such a short term context, for the purpose of checking aforementioned lookups for unknown domains.
For analysing logs, just use the log files directly.

When you observe a freeze again, the following commands may reveal overly active clients or excessively requested domains:

echo ">stats >quit" | nc localhost 4711
echo ">top-clients >quit" | nc localhost 4711
echo ">top-domains >quit" | nc localhost 4711
echo ">top-ads >quit" | nc localhost 4711

Just saw this on the dnsmasq-discuss mailing list:

A couple posts on the OpenWrt forum have indicated that they are having DNS issues that are resolved by raising the forward limit from OpenWrt's default of 150 to 500.

dns-forward-max=500

Assuming that there are indeed a lot of queries going on simultaneously, what does this affect? Does it increase the transient storage used during these peaks or is the memory footprint of dnsmasq increased overall? My experiments say, "it's only transient", but I'm curious if the experts could weigh in.

I did a quick test with both settings on a box with dnsmasq 2.86, loaded 100 pages in the old web browser, full of cdn refs and such, and couldn't see any functional difference in CPU or RAM usage between the two tests.

So, I guess the real question is, is there any reason not to raise the default for the typically small-memory, limited-CPU boxes that run OpenWrt?

Eric

I guess it depends what those issues are.

not resolving some request or completely non responding.

I have the non responding issue.

Bucking_Horn : It's still running so I'll post your logs later when the freeze happends again (usually at night not sure why tho)

Did I have to run those commands just in the CLI?

None of them respond and I have to use ctrl-c to get back to the command line.

The logs are not that hude either so I don't think it's running out of disk space.

ls -la /var/log/pihole/pihole*
-rw-r----- 1 root pihole 38904 jun 14 08:21 /var/log/pihole/pihole_debug.log
-rw-r----- 1 pihole pihole 0 jul 8 00:00 /var/log/pihole/pihole.log
-rw-r----- 1 pihole pihole 137085243 jul 8 00:00 /var/log/pihole/pihole.log.1
-rw-r----- 1 pihole pihole 24555099 jul 7 00:00 /var/log/pihole/pihole.log.2.gz
-rw-r----- 1 pihole pihole 12755254 jul 6 00:00 /var/log/pihole/pihole.log.3.gz
-rw-r----- 1 pihole pihole 23015269 jul 5 00:00 /var/log/pihole/pihole.log.4.gz
-rw-r----- 1 pihole pihole 23686867 jul 4 00:00 /var/log/pihole/pihole.log.5.gz
-rw-r--r-- 1 root root 1914 jul 9 03:51 /var/log/pihole/pihole_updateGravity.log

If 'those commands' would be referring to the telnet API calls via nc localhost 4711:
Yes.
They should return instantly.

I keep getting the freezes.

could it be that the log backup is hanging or something?

the time of the log and the latest backup is always 00:00

ls -la /var/log/pihole/pihole*
-rw-r----- 1 root pihole 38904 jun 14 08:21 /var/log/pihole/pihole_debug.log
-rw-r----- 1 pihole pihole 0 jul 31 00:00 /var/log/pihole/pihole.log
-rw-r----- 1 pihole pihole 142949226 jul 31 00:00 /var/log/pihole/pihole.log.1
-rw-r----- 1 pihole pihole 19967154 jul 30 00:00 /var/log/pihole/pihole.log.2.gz
-rw-r----- 1 pihole pihole 22230114 jul 29 00:00 /var/log/pihole/pihole.log.3.gz
-rw-r----- 1 pihole pihole 25796768 jul 28 00:00 /var/log/pihole/pihole.log.4.gz
-rw-r----- 1 pihole pihole 31791526 jul 27 00:00 /var/log/pihole/pihole.log.5.gz
-rw-r--r-- 1 root root 1914 jul 30 03:51 /var/log/pihole/pihole_updateGravity.log

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