Winbindd limited by select

Ken Cross kcross at
Wed Feb 12 21:27:54 GMT 2003

We should probably do both.  

IMO, 256 (the default in NetBSD) is waaaay too low and we should have a
way to increase it.  

OTOH, if something goes nuts, it should detect the fact that too many
connections have occurred and log the error.


Ken Cross

Network Storage Solutions
Phone 865.675.4070 ext 31
kcross at 

-----Original Message-----
From: at
[ at]
On Behalf Of Michael B. Allen
Sent: Wednesday, February 12, 2003 4:26 PM
To: Ken Cross
Cc: samba-technical at
Subject: Re: Winbindd limited by select

On Wed, 12 Feb 2003 07:36:19 -0500
"Ken Cross" <kcross at> wrote:

> I've run into a problem with winbindd in both 2.2.x and 3.0 where it 
> just locks up after a while on large, busy networks.
> We finally tracked down the problem to the fact that the C library 
> "select" function is limited by default to 256 file descriptors in 
> NetBSD (1024 in FreeBSD, 2048 in Linux).  So once 256 (or whatever) 
> smbd processes connected to winbindd, it broke pretty badly and was 
> very hard to kill.
> This is set at compile-time, not run-time.  This line:
>  #define FD_SETSIZE 2048  /* Max # of winbindd connections */
> must occur before the first invocation of <sys/types>.
> This could be a build option, but it might be much simpler to 
> hard-code it in local.h, which is what I did to fix it.

Better still add a check to see if the limit has been reached and return
an error.


A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not yet
been conceived. 

More information about the samba-technical mailing list