On Tue, 18 Dec 2012 11:21:06 -0500 Bowie Bailey wrote: > On 12/17/2012 6:11 PM, RW wrote:
> > If you set min-spare == max-spare you are likely to get children > > created and deleted in rapid succession, the default is 1 and 2. > > Right. Consider this situation starting with an idle server: > > 1 idle child > email comes in > 1 busy child > too few spares, so create one > 1 busy child, 1 idle child > email processing finishes > 2 idle children > too many idle children, kill one > 1 idle child > another email comes in... > > Every time an email comes in, the server will have to start a new > child process and every time a child process goes idle, the server > will have to kill one. You need a range so that the server can work > more efficiently. It isn't quite that pedantic about the count. The number of children is checked when a child becomes idle and after an attempt to reassign that child to a waiting client connection. If you process one at a time, you have one idle child before and after the scan, so no fork happens. What the OP saw is what happens when a second client comes in before the first has completed. In that case the second client gets assigned to the original child and a second child is created and then destroyed (if there are no further waiting clients).