Symptoms
Connections to your DNS server are failing or timing out, and your server's system log shows errors similar to the following:
Jan 1 00:00:00 hostname pdns_server: Limit of simultaneous TCP connections reached - raise max-tcp-connections
Description
A large number of simultaneous connections can exhaust the PDNS server's connection limit, and it will not be able to respond until a connection is freed.
Workaround
We can change the setting within the config file for PDNS:
- Connect to the server over SSH as root.
- Open /etc/pdns/pdns.conf in your text editor of choice.
- Find the following entry. By default, it is commented out:
# max-tcp-connections=20
- Remove the comment, and update the number to be higher. Start out by raising it in small increments of 5 or 10:
max-tcp-connections=25
- Save your file and close the editor.
- Restart the PDNS service to load the changes:
/scripts/restartsrv_pdns
If you continue to see connection issues after raising the limit a small amount, you may try raising it again until the connections can be made reliably.