View Single Post
  #7  
Old 08-02-2006, 08:39 AM
andreas andreas is offline
Senior Member
 
Join Date: Aug 2006
Posts: 91
Quote:
Originally Posted by mistwang
Are you testing this from a browser by clicking "refresh" button quickly and repeatedly?
Yes.

Quote:
Or using a load testing software like "ab"?
The former way may cause what you observed, that because the request has been canceled in the middle, so LSWS has to close the connection on its side before the request has been finished, on the dispatch.lsapi side, the process will die after finish the request since the connection to server has been lost.
the dispatch.lsapi process will stay alive as long as the connection to server is in good shape.
Lshttpd should not make more than 3 concurrent connections to dispatch.lsapi, but there might be more processes which were processing canceled requests.
Can't this be prevented? I find it worrying that someone can create insane numbers of processes with this kind of behaviour. Especially with the high RAM requirements of Rails it is very easy to DOS a small server this way.

Quote:
That's my explanation, but I might be wrong. Please try you test with "ab", there should be four process at most. If it is not the case, please let me know.
Yes, it doesn't create more than 3 children when I use ab -c 10. But it kills all but one after the requests are finished. Is there some way of keeping the processes alive?
Reply With Quote