9.5.0-P2 and socket: too many open file descriptors

JINMEI Tatuya / 神明達哉 Jinmei_Tatuya at isc.org
Tue Aug 12 19:44:33 UTC 2008


At Mon, 11 Aug 2008 22:32:43 -0700 (PDT),
Fr34k <freaknetboy at yahoo.com> wrote:

> Usual question:
> - did you build named with a large value of FD_SETSIZE?
> ANSWER: No. I'm not even sure how to change it. Would I edit
> lib/isc/unix/socket.c? Should I change it?

You should build named by setting STD_CDEFINES appropriately.  For
example, if you use a sh variant (like zsh or bash):

$ STD_CDEFINES='-DFD_SETSIZE=xxxx' ./configure [other configure options]
$ make

('xxxx' should be some reasonably large value: probably like 2048, or
perhaps 4096)

> - did you specify a reasonably large value for max-cache-size?
> ANSWER: I have "max-cache-size 0 ;" I thought you, or a fellow isc
> person, said this would mean bind would regulate the size as it did
> in previous versions. Correct? Do you another suggestion?

That's correct, but it would be safer to specify some reasonable
finite value.  The appropriate value depends on your environment, so
you should first monitor the behavior of the server with the zero
max-cache-size value.

> - how many sockets were actually opened when you saw this message?
> ANSWER: What is the best method to measure and capture this? lsof,
> pfiles, or ?

If you have lsof, it would provide the answer to this question.

> And you may also want to check the OS capability with this tool:
> http://www.jinmei.org/selecttest.tgz
> 
> ANSWER: Done and the output is below. What do you think?

The test result indicates what you should do is to rebuild named with
a larger FD_SETSIZE.

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.


More information about the bind-users mailing list