On May 10, 2010, at 3:37 PM, Graham Dumpleton wrote: > > This is logical given that you have configured Apache server child > processes to be able to accept more requests than can be funnelled > into the mod_wsgi daemon processes. The Apache server child processes > will be blocked on the connect() call to the mod_wsgi daemon processes > waiting for them to call accept() on the listener socket. When it > finally connects it will straight away start trying to proxy data from > client across to daemon process. If client had disconnected, only when > it attempts to read data from client will it know that. This is > because Apache uses blocking threads and not an event driven > select/poll loop.
Am I right to assume that for a GET, the entire request would have been consumed by apache while it was waiting for a mod_wsgi daemon to become available, so that when it gets to mod_wsgi, the entire request looks intact to the Python handler? Is there any way that mod_wsgi could detect that the client has disconnected, so that it could avoid actually trying to run the request? We're mostly trying to allow an upstream proxy to throttle its load to the appserver by timing out requests that have been sitting around a while. it seems like we really should be setting MaxClients == # of daemons, and letting the http requests pile up in the kernel, rather than letting apache have a crack at it. Does this seem reasonable? On a related note, and mostly out of curiosity, does that mean that mod_wsgi/apache is essentially leaving it up to the kernel to decide the order to process the requests (since everyone is blocked on a connect()) - and is that a reliable way to ensure that the first requests are processed more or less in the order they arrived? (I'm fully expecting the answer to this to be "well duh of course, that's how all servers work...") Alec > > Graham > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
