Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In order to fix a problem with DNS resolution in a particular customer environment, their admin has suggested adding options timeout:0 to the /etc/resolv.conf file on their CentOS 5 server.

The man page on the OS for resolv.conf has this to say about the timeout setting:

timeout:n

sets the amount of time the resolver will wait for a response from a remote name server before retrying the query via a different name server. Measured in seconds, the default is RES_TIMEOUT (currently 5, see <resolv.h>).

And I see from here that there is a silent cap of 30 seconds, but I haven't found any documentation anywhere that tells me what the effect of setting this value to 0 will be. Does anybody know?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

This is actually a good idea when you have more than one nameserver set in your resolv.conf. The effect is that the resolver asks the number of nameservers without waiting and returns the first response. It should be used only when your first server in the resolv.conf is overloaded. But normally it has no effect, because the dns responses are quick.

Another good solution is to use nscd - Name service Cache Daemon.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.