imapd's hang when maxchild count is reached

Jeremy Rumpf jrumpf at heavyload.net
Wed Feb 5 17:47:13 EST 2003


> Hmmm... what does Sendmail do?  It's got lots of children, but still
> manages to refuse connections when it gets busy (RefuseLA)...  I kinda
> like that behavior.  I definitely like it better than keeping more and
> more sockets open.
>
> --
> Stephen L. Ulmer                              ulmer at nersp.nerdc.ufl.edu
> Senior Systems Programmer                         http://www.ulmer.org/
> Northeast Regional Data Center                      VOX: (352) 392-2061
> University of Florida                               FAX: (352) 392-9440

It may not prefork it's processes. The master process could accept the 
connection, fork, closes the socket (the child is now servicing it), and go 
back into a listen state. Therefore the master process can choose to reject 
connections without any coordination from the children. Children then have a 
service life of one connection and that's it.

They could also use a technique where a master process can pass file (socket) 
descriptors down to a child via a unix domain socket using sendmsg() or 
recvmsg(). In this case the master accepts the connection, passes the 
descriptor to a child via sendmsg(), closes the socket (the child should now 
be servicing it), and goes back to listening.

Either way, in the above, the master process is the only process that actually 
accepts the connections. 

I'm not sure how sendmail actually does it though, the above is purely 
speculation...

Jeremy




More information about the Info-cyrus mailing list