On Sat, Jul 14, 2007 at 10:02:51AM +0200, Robert Felber wrote:
> > I currently have the maximum number of postfix smtp processes set to 300,
> > so the theory here is that all 100 policyd-weight processes are busy, 128
> > postfix processes are attempting to connect and sitting in the listen
> > queue, and then the 129th+ processes get connection timed out?
> 
> Yes because policyd-weight childrens all are in a "accept" state. If the 
> kernel
> doesnt provide a socket-descriptor due to somaxconn issues the policyd-weight
> returns to accept() on its listen socket.
> 
> At some time postfix will timeout.

Ok, wrong. This would result in a connection refused.

 
> 
> > But that
> > doesn't make sense, because shouldn't policyd-weight log a notification
> > when it tried to start the 101st process which would have exceeded the
> > maximum?
> 
> Yes. How many policyd-weight instances are up at this time?
> 
> > The only way the queue backlog should exceed 128 is if that many
> > connections are made without policyd-weight doing an accept?
> 
> Or not being able to do a sane accept().

In theory it is not good to have less policyd-weight MAX_PROC than 
postfix MAX_PROC.


In your scenario this means, that 100 policyd-weight instances have
to handle 300 smtpd instances, which means approx 3 smtpd clients
per policyd-weight instance - this can result into smtpd timeouts, too.


The only way that not a new child is spawned is, that the IPC connection
between master and child got messed up and the master lost its
child status information, which again results in no new child spawned until
the master gets a signal from another child to listen on the main tcp socket 
again.


The warning "ignoring garbage: 1" could be a sign of such trouble.


Currently I would suggest following:

Set policyd-weight MAX_PROC equal to SMTPD MAX_PROC
Set kern somaxconn to 1024


I have done several stresstests at my home (linux, 2.6.12) and work (fbsd, 6.1) 
machine and couldn't reproduce a master/child IPC desync or timeouts.


Could you please provide a md5 sum of your policyd-weight version?
If it is 0.1.14.5 it should match 8200d084e36e287b2fc9e9ac330e8e8c



-- 
    Robert Felber (PGP: 896CF30B)
    Munich, Germany

____________________________________________________________
Policyd-weight Mailinglist - http://www.policyd-weight.org/

Reply via email to