修正 bind 出現 max open file (1024) 的錯誤

While I upgrading my gentoo box, the BIND had been recomplied. After I re-steup my configurations there exists an error on the log.

max open files (1024) is smaller than max sockets (4096)

This is a bug introduced from kernel and I found a solution from Bombcar Heavy Blog.

1
2
# cd /etc/security/limits.d
# vim named.conf

And fillout the settings:

named        soft    nofile        4096

Then modify the named.conf settings:

# vim /etc/bind/named.conf

In the Options section, filling it:

files 4096;

Finally, restart the named and the error disappear. 😀

Leave a Reply

Your email address will not be published. Required fields are marked *