While going though my logs I found that BIND9 on Debian version 5.x is giving a warning which read as follows:
max open files (1024) is smaller than max sockets (4096)
How do I fix this problem?
The "open files is smaller than max sockets" problem is kernel bug which is already fixed in 2.6.28. Linux kernel returns EPERM when RLIMIT_NOFILE is set to RLIM_INFINITY. To fix this issue update your Linux kernel using yum or apt-get command.
# yum update
OR
# apt-get update
# apt-get upgrade
Reboot the server. Verify error is not reported after boot:
# tail -f /var/log/messages
See kernel bug # 461458 and 515673 for more information.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 9 comments… read them below or add one }
Soultion? ;-)
Thanks for the heads up.
how to fix on debian lenny 5.0 ( 2.6.26-2-686):
# vim /etc/default/bind9
add “-S 1024″ to “OPTIONS” line:
restart bind:
# /etc/init.d/bind9 restart
check for errors:
# cat /var/log/syslog
ooops :)
# vim /etc/default/bind9
add “-S 1024″ to “OPTIONS” line:
# run resolvconf?
RESOLVCONF=yes
# startup options for the server
OPTIONS="-u bind -S 1024"
how to fix the error in freebsd?
sysctl kern.maxfilesperproc=4096
There’s another way of fixing it on Linux:
At the beginning of the “start” section of /etc/init.d/bind9 add i.e.:
ulimit -HSn 8192
so you have some extra, spare file descriptors for the whole process,
and then restart the bind using:
# /etc/init.d/bind9 restart
and voila, log reads:
[...]
named[19060]: using up to 4096 sockets
[...]
The preceding “ulimit -HSn 8192″ command might better go in /etc/default/bind9 on debian to keep package updates (ie. changed config files) a little smoother.
If you are using Centos or redhat, edit /etc/sysconfig/named and at the bottom, at,
OPTIONS=”-4 -S 1024″
It think the author’s claim of upgrading the kernel it’s false and can be dangers. I got a vmware application runnning on the host, upgrading the kernel can simply break it