← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~jameinel/launchpad/loggerhead-disconnect-701329 into lp:launchpad

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/4/2011 3:17 PM, John A Meinel wrote:
> John A Meinel has proposed merging lp:~jameinel/launchpad/loggerhead-disconnect-701329 into lp:launchpad.
> 
> Requested reviews:
>   Launchpad code reviewers (launchpad-reviewers)
> Related bugs:
>   #701329 loggerhead OOPS - error: [Errno 32] Broken pipe
>   https://bugs.launchpad.net/bugs/701329
> 
> For more details, see:
> https://code.launchpad.net/~jameinel/launchpad/loggerhead-disconnect-701329/+merge/48665
> 
> This should fix the 16k OOPS reports that we were seeing on loggerhead. There are probably other ways to fix it, as well.
> 
> The failure was being triggered because haproxy is issuing a HEAD request to loggerhead, and then closing before it actually reads all of the result. loggerhead ends up getting socket.error(EPIPE) while trying to write information out.
> 
> I wasn't able to trigger this by going to the Apache proxy interface, presumably because Apache reads the full header from loggerhead before it then reports things back to the user.
> 
> In the WSGIHandler code, it is suppressing all of these socket errors (SSL error, socket.error, etc). I went ahead and followed suit, to suppress them instead of reporting an oops.
> 
> If you consider the code as it exists, it would want to give OOPS info to the user. However, if the socket is closed, you can't send anything anyway.
> 
> If we wanted, we could have a more fine-grained approach here (only suppress socket.error(EPIPE), or something like that.) We could also just trap at a different level. For example in the 'write_wrapper' function.

Small update to the original diff. There is a distinction in the code
about the initial 'call the app', from the 'iterate the result'. And
only the latter was trapped, testing locally revealed that I need to
trap both. (So I've updated it to do so.)

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1MdawACgkQJdeBCYSNAAOzpwCdES5X4kgoUAaT7rbpsDkXMDbs
ZcMAnA/vECqzsWy0EHwV8WCLNQoQDOkh
=rIh5
-----END PGP SIGNATURE-----

-- 
https://code.launchpad.net/~jameinel/launchpad/loggerhead-disconnect-701329/+merge/48665
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jameinel/launchpad/loggerhead-disconnect-701329 into lp:launchpad.



References