Comment 12 for bug 1166198

Revision history for this message
gholt (gholt) wrote :

I am unsure why that would solve your issue, but the code you pasted in #8 shows the HTTPConnection being closed, the HTTPResponse being read from (which should empty any buffers then raise an Exception since the HTTPConnection is closed), then the HTTPResponse being closed. It is a bit hard to follow after a few refactors of the code I guess.

It was originally written that way because Python socket objects were not getting garbage collected. It was pretty easy to see the effects after running a day or so and then checking /proc/net/sockstat

However, maybe due to the refactors the gc would work even without these extra shenanigans now, not sure.

But it seems really strange that reading from a closed connection somehow causes you to keep downloading the whole object from the storage node. Hopefully one of us will get some time to retest around this area.