How do I change the maximum open sockets with bind9 under Red Hat Enterprise Linux ?

Solution Verified - Updated -

Issue

  • While starting bind, it says the maximum open sockets is limited to 4096

  • modified the /etc/security/limits.conf file with the option:

    * - nofile 16384 
    
  • Sysctl reports a large number of allowed open files:

    # /sbin/sysctl fs.file-max 
    fs.file-max = 357302 
    
  • The limits are shown during bind startup at the /var/log/messages:

    May 12 18:02:00 ns named[18864]: starting BIND 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 -u named -t /var/named/chroot
    May 12 18:02:00 ns named[18864]: adjusted limit on open files from 16384 to 1048576
    May 12 18:02:00 ns named[18864]: found 8 CPUs, using 8 worker threads
    May 12 18:02:00 ns named[18864]: using up to 4096 sockets                      <================
    May 12 18:02:00 ns named[18864]: loading configuration from '/etc/named.conf'
    May 12 18:02:00 ns named[18864]: using default UDP/IPv4 port range: [1024, 65535]
    May 12 18:02:00 ns named[18864]: using default UDP/IPv6 port range: [1024, 65535]
    May 12 18:02:00 ns named[18864]: listening on IPv4 interface lo, 127.0.0.1#53
    May 12 18:02:00 ns named[18864]: listening on IPv4 interface eth0, 62.169.194.97#53
    May 12 18:02:00 ns named[18864]: command channel listening on 127.0.0.1#953
    May 12 18:02:00 ns named[18864]: zone 0.0.127.in-addr.arpa/IN: loaded serial 42
    May 12 18:02:00 ns named[18864]: zone localhost/IN: loaded serial 42
    May 12 18:02:00 ns named[18864]: running
    

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • bind 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.