How about this: 1. procmgr_post_spawn_cmd() now return a status code from PM, so process handler now know the spawn request is denyed or not. 2. if a new process is created, no sleep is needed. 3. if no process is created, sleep a while
2012-08-16 pqf 发件人:Lazy 发送时间:2012-08-16 16:47 主题:Re: Re: mod_fcgid concurrency bottleneck, issue#53693 收件人:"dev"<dev@httpd.apache.org> 抄送: 2012/8/16 pqf <p...@mailtech.cn>: > Hi, Michal > My solution do "add availability to each class", which is the > procmgr_post_spawn_cmd() call in each loop do. > The sleep() call is intrudused for a stress test without warm up time, in > this case, mod_fcgid will create more processes than a slow start one(each > process handler can't apply a free slot on the very begining, so send a > request to process manager to create one, it's easy to reach the max # of > process limit while httpd startup, but the idle process will be killed > later), the sleep() call is a little like a "server side warm up delay". > But since someone said remove this sleep(), the server work fine without > bottleneck(Maybe he didn't notise the warm up issue?), so I thought remove > the sleep() is a good idea. But reduce the time of sleep() is fine to me > too. I was referring to the case where all processes are busy, without sleep(), handle_request() wil quickly send spawn requsts, whith will be denyed by process menager, with sleep() handle_request() will always wait quite a long time, occupying slots -- Michal Grzedzicki