On 20 April 2012 07:53, James Brown <[email protected]> wrote: > If a client goes away while mod_wsgi is writing (causing ap_pass_brigate to > fail), it currently raises an IOError, which causes an entry in Apache's > error log. There is some code that tries to detect disconnects and > optionally log a debug statement instead, but it doesn't work very well. > > Additionally, if the client goes away during a write, the ap_bucket_brigade > is never cleaned up. > > I believe that the attached patch will resolve both issues.
I will look at it, but I recollect both things are as they are for a reason. First off, the bucket brigade will be cleaned up in as much no memory will leak because of how Apache memory pooling works. Doing the cleanup when an error occurs is possibly not meant to be done per rules for using Apache bucket API because it technically is in an unknown state at that point. Trying to do a cleanup could therefore result in undefined behaviour. As for whether messages, when yielding response from an application, either way a message is going to end up in the logs and nothing more. Your issue therefore seems to be the log level of messages in logs and your wanting to hide them as much as possible. My recollection of why it is done the way it is is that an error at that point can actually indicate a problem in the Apache output filter chain and doesn't just mean that an error occurred in sending data to the client. Unfortunately mod_ssl seems to indicate errors when issue was a closed client connection because SSL will flag an error if in middle of some SSL exchange. In other words, one should necessarily be masking what could be a true actual error or problem rather than just noise. I would really need to try and find old emails about this as has been discussed before. 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.
