[Dnsmasq-discuss] Very slow load time on systems with a large `ulimit -n`

Arthur Darcet arthur at darcet.fr
Mon Mar 2 08:32:44 GMT 2020


As discussed here: https://github.com/pi-hole/FTL/issues/703

At startup, dnsmasq tries to close all file descriptors from 0 to `ulimit
-n` (the maximum number of open files) - here

On setups where this limit is high, this takes a large amount of time - or
even "hangs" indefinitely. Docker sets this limit to ~1M for instance - and
the kubernetes setup I am using (k3s) is setting it to "Infinity", which
translates to 1073741816.

I would suggest switching over to something based on the actually open
files - like was done for the rpm package: cf
https://bugzilla.redhat.com/show_bug.cgi?id=1537564 and
https://github.com/rpm-software-management/rpm/pull/444/files for an actual

Work around is to run a `ulimit -n 1024` before starting dnsmasq - but
that's not really a clean solution.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20200302/648bb3fc/attachment.html>

More information about the Dnsmasq-discuss mailing list