Setting DNS cache limit with FTLDNS

Where can i set the max dns cache size?

We specifically disabled the limit of only 10.000 that is present in standard dnsmasq.

You can set the value e.g. in /etc/dnsmasq.d/01-pihole.conf like

cache-size=500000

Don’t forget to restart pihole-FTL after changing this line.

4 Likes

Thanks :slight_smile:

I don’t find this to be true in the latest release. Any value above the default 10000 causes dnsmasq to fail in starting.

I see this statement also in the DNS section of the new documentation page.

https://docs.pi-hole.net/ftldns/dns-resolver/

States the forked dnsmasq no longer has this limit. Is this not the case for pihole on Debian?

As described on the documentation you have linked, we’re not using dnsmasq ans longer. It has been replaces by pihole-FTL which does now include a DNS server (based on dnsmasq)! So, please don’t start dnsmasq at all, but only use pihole-FTL.

Apologies. I will get right to it then.

Modifying /etc/dnsmasq.d/01-pihole.conf with a cache-size other than 10000 causes pihole FTL to no longer start, is this expected?

Process is:

Modify cache-size to 100000, save.
Reboot pihole
Webui continues to show “lost connection to FTL”

Did you really modify or did you add the setting? It is possible that this setting is already set in another file in /etc/dnsmasq.d or maybe even /etc/dnsmasq.conf. As multiple occurrences of such a setting are not meaningful, this will cause a hard fail of the pihole-FTL (this was also the case with dnsmasq). This error should also be logged to /var/log/pihole.log.

Yep, I surely did # out the existing entry in /etc/dnsmasq.d/01-pihole.conf and added my own entry of:

#cache-size=10000
cache-size=100000

But not before making a backup of the existing 01-pihole.conf file to 01-pihole.conf.ORIG

I checked /etc/dnsmasq.conf, and seemed all entries in this file were already # out. Please note, this is a vanilla installation on a debian 9 stretch vm using the latest dev branch as of yesterday evening. This was my ONLY manual edit.

There we go. The ending is not something that needs to be .conf. Please either remove this .ORIG file or move it our of this folder (e.g., into your home directory).

3 Likes

Thanks buddy! As I was typing it this morning I was thinking to myself, surely it’s looking for .conf, but… could it be that it’s reading both files… :slight_smile: Thanks @DL6ER will test again tonight.

Worked fine, thanks.