Maintained by: NLnet Labs

[Unbound-users] FreeBSD + Unbound 1.0.2 error: too many file descriptors requested

Wouter Wijngaards
Tue Aug 12 09:14:48 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anton Yuzhaninov wrote:
| On 12.08.2008 00:07, Dmitriy Demidov wrote:
|> Hi Wouter. Thanks for you answer!
|> On Monday 11 August 2008, you wrote:
|>> Hi Dmitriy,
|>> Unbound 1.0.2 calculates the maximum number of open files.  And checks
|>> if that is going to work. So that it does not start OK, but later on,
|>> when it is busy, fails.  This error is because the select system call
|>> has a hardcoded limit of 1024 (limited by the system).
|>
|> Sorry. Can you please explain it more detailed - "hardcoded limit of
|> 1024" - is it FreeBSD limit or Unbound limit? Unbound 1.0.2 now checks
|> for that, but earlier versions didn't performed that checks?
|>
|
| limit on number of descriptors for select is FD_SETSIZE
|
| /usr/include/sys/select.h:#define       FD_SETSIZE      1024U
|
| If you need more than 1024 descriptors better to build Unbound with
| libevent.
|
| Other option is use one thread - for not heavy loaded server it will be
| enough.

The above is correct.
And Yes, the limit was there in previous versions, but 1.0.2 does
checking for it.

That is why I suggested forking processes, because then every process
has a 1024 limit - thus 8*1024 - 8192 limit in total.

Unbound uses num-threads equal to your number of cpus really.
It could also be a scheduling problem in your OS (like a raging herd
problem).

Best regards,
~   Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkihOGgACgkQkDLqNwOhpPjXtwCeN+W2Rzo1gLjnjmBgb8h1DwJI
eA0AoKnv04juR1d3xd2PnfJ4UhoEyDNh
=cKC3
-----END PGP SIGNATURE-----