imapd's hang when maxchild count is reached
Jeremy Rumpf
jrumpf at heavyload.net
Tue Feb 11 15:59:02 EST 2003
On Thursday 06 February 2003 12:10 pm, Henrique de Moraes Holschuh wrote:
> On Thu, 06 Feb 2003, Dave McMurtrie wrote:
> > Would this actually work anyway? If the parent were to pass a file
>
> You can send descriptors over sockets if your unix kernel supports it.
> Linux does, and apparently so does Solaris.
>
> Anyway, I dislike the idea of losing preforks heavily, it is bound to be a
> major pain when the system is overloaded.
The send descriptors idea would also allow a prefork. I would also agree that
the one connection per child idea is out the door.
One other idea, could it be portable enought to say, initialize a semaphore
and set the resource count on it to the maximum number of connections. If a
child accepts a connection, it will first have to gain the semaphore resource
first. If it fails (all the semaphore resources are taken), then the child
would know that the maximum number of connections has been exceeded and
return an error to the connecting party.
I did read an old Bugzilla entry that said fully threading imapd and friends
was an idea... Don't know if that has any affect on any future direction.
I haven't worked with semaphores for a long while so I could be talking outta
my arse :).
Jeremy
More information about the Info-cyrus
mailing list