client disconnect errors are logged again with newer versions of mod_wsgi
|Reported by:||Christian Boos||Owned by:||Christian Boos|
Reduce logging noise with client disconnects, for recent versions of mod_wsgi (e.g. 4.5.13)
We have an internal check to avoid polluting the trac.log with errors related to client disconnections or response write failures.
For mod_wsgi, this check rely on error messages. Newer versions (don't know since when exactly) add the "Apache/mod_wsgi" prefix to these messages, so we need to take that into account.
[pid 3682 139642907973376] 2017-01-05 17:00:28,194 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/log/trunk/trac/admin?rev=11508'">, referrer None Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 617, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 274, in dispatch req.send(output, content_type or 'text/html') File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 693, in send self.write(content) File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 833, in write self._write(''.join(buf)) IOError: Apache/mod_wsgi failed to write response data: Broken pipeBroken pipe
Also, it's "failed to write response data" now instead of "failed to write data".
I think fixing this starting from 1.0 is good enough.