[Pdns-users] Auth. server leaks file descriptors.

Augie Schwer augie.schwer at gmail.com
Thu Feb 7 23:10:43 UTC 2008


I saw this in my logs after getting reports that recursive TCP queries
weren't being answered:

Feb  7 11:14:00 a pdns[20177]: TCP nameserver had error, cycling
backend: Error making TCP connection socket to recursor: Too many open
files

I confirmed that I could not actually make recursive TCP DNS queries;
although I could make non-recursive TCP DNS queries.

I restarted the recursor; no change; I restarted the auth. server; all
works as expected.

The auth. server has been up for over 4 hours and already has over 40
open file descriptors. Details below, but does anyone have any
thoughts? I'm going to raise the fd limit for a short term fix, but I
don't remember seeing this until we went to the 1092 snapshot.

# ps auxw | grep /usr/sbin/pdns_server-instance | grep -v grep | awk
{'print $2'} | xargs -i ls -l /proc/{}/fd/ | wc -l
47

# ps auxw | grep /usr/sbin/pdns_server-instance | grep -v grep | awk
{'print $2'} | xargs -i bash -c 'lsof | grep {}'
pdns_serv 32624    pdns  cwd       DIR        3,3      4096    1013859 /var/run
pdns_serv 32624    pdns  rtd       DIR        3,3      4096          2 /
pdns_serv 32624    pdns  txt       REG        3,3   4906652    4452444
/usr/sbin/pdns_server
pdns_serv 32624    pdns  mem       REG        3,3     47404    4235295
/lib/libnss_files-2.3.4.so
pdns_serv 32624    pdns  mem       REG        3,3    112168    4235230
/lib/ld-2.3.4.so
pdns_serv 32624    pdns  mem       REG        3,3   1529120    4236303
/lib/tls/libc-2.3.4.so
pdns_serv 32624    pdns    0r     FIFO        0,7            132464962 pipe
pdns_serv 32624    pdns    1w     FIFO        0,7            132464963 pipe
pdns_serv 32624    pdns    2u      CHR        1,3                 2072 /dev/null
pdns_serv 32624    pdns    3u     unix 0xf709cd00            132464967 socket
pdns_serv 32624    pdns    4u     unix 0xf709cb00            132464958
/var/run/pdns.controlsocket
pdns_serv 32624    pdns    5u     IPv4  132464968                  UDP *:domain
pdns_serv 32624    pdns    6u     IPv4  132464969                  TCP
*:domain (LISTEN)
pdns_serv 32624    pdns    7u     IPv4  132464974                  UDP
localhost.localdomain:56062->localhost.localdomain:5300
pdns_serv 32624    pdns    8u     unix 0xf718db00            132464975 socket
pdns_serv 32624    pdns    9u     IPv4  132464977                  TCP
b.ns.sr.sonic.net:tproxy (LISTEN)
pdns_serv 32624    pdns   10u     unix 0xf6b2a980            132464979 socket
pdns_serv 32624    pdns   11u     unix 0xf6b2ab80            132464981 socket
pdns_serv 32624    pdns   12u     unix 0xf62ee980            132464983 socket
pdns_serv 32624    pdns   13u     unix 0xf718d700            132465508 socket
pdns_serv 32624    pdns   15u     IPv4  132489867                  TCP
localhost.localdomain:54867->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   16u     IPv4  132528589                  TCP
localhost.localdomain:54890->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   17u     IPv4  132597996                  TCP
localhost.localdomain:54940->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   18u     IPv4  132641258                  TCP
localhost.localdomain:54966->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   19u     IPv4  132648024                  TCP
localhost.localdomain:54975->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   20u     IPv4  132665865                  TCP
localhost.localdomain:54986->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   21u     IPv4  132686598                  TCP
localhost.localdomain:54997->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   22u     IPv4  132757089                  TCP
localhost.localdomain:55024->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   23u     IPv4  132758896                  TCP
localhost.localdomain:55027->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   24u     IPv4  132780048                  TCP
localhost.localdomain:55037->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   25u     IPv4  132759166                  TCP
localhost.localdomain:55028->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   26u     IPv4  132780413                  TCP
localhost.localdomain:55038->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   27u     IPv4  132783355                  TCP
localhost.localdomain:55043->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   28u     IPv4  132783637                  TCP
localhost.localdomain:55044->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   29u     IPv4  132780667                  TCP
localhost.localdomain:55039->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   30u     IPv4  132802121                  TCP
localhost.localdomain:55048->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   31u     IPv4  132803067                  TCP
localhost.localdomain:55049->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   32u     IPv4  132916988                  TCP
localhost.localdomain:55107->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   33u     IPv4  132932880                  TCP
localhost.localdomain:55112->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   34u     IPv4  132961478                  TCP
localhost.localdomain:55128->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   35u     IPv4  132974235                  TCP
localhost.localdomain:55130->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   36u     IPv4  133047868                  TCP
localhost.localdomain:55164->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   37u     IPv4  133067556                  TCP
localhost.localdomain:55172->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   38u     IPv4  133088378                  TCP
localhost.localdomain:55201->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   39u     IPv4  133357679                  TCP
localhost.localdomain:55591->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   40u     IPv4  133088620                  TCP
localhost.localdomain:55202->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   41u     IPv4  133137984                  TCP
localhost.localdomain:55398->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   42u     IPv4  133137674                  TCP
localhost.localdomain:55395->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   43u     IPv4  133400879                  TCP
localhost.localdomain:55642->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   44u     IPv4  133425088                  TCP
localhost.localdomain:55662->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   45u     IPv4  133428904                  TCP
localhost.localdomain:55669->localhost.localdomain:5300 (CLOSE_WAIT)
pdns_serv 32624    pdns   46u     IPv4  133425512                  TCP
localhost.localdomain:55664->localhost.localdomain:5300 (CLOSE_WAIT)

# rpm -qa | grep pdns
pdns-recursor-3.1.4-1
pdns-static-2.9.21.20070915.1092-1


-- 
Augie Schwer    -    Augie at Schwer.us    -    http://schwer.us
Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C072


More information about the Pdns-users mailing list