Comment 2 for bug 1498823

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/226700
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=03769b699f6f98e775c2b8deacee8cd45cbc7095
Submitter: Jenkins
Branch: master

commit 03769b699f6f98e775c2b8deacee8cd45cbc7095
Author: Mehdi Abaakouk <email address hidden>
Date: Wed Sep 23 13:05:05 2015 +0200

    Workaround requests/urllib connection leaks

    When a ConnectionError occurs, python-requests <= 2.8.0
    and/or urllib3 <= 1.11, connections are not returned to
    the pool.

    This change adds a CustomHTTPAdapter to workaround this
    issue.

    This HTTPAdapter doesn't trigger theses urllib3 issues.
    This HTTPAdapter workaround this by enforcing preloading
    of the response. When enabled, urllib3 releases the connection
    to the pool immediately after its usage, and doesn't trigger the
    issue.

    By enforcing preloading, this break some requests
    features (like stream) that we didn't use into our GnocchiClient

    Upstream bugs:

    * https://github.com/shazow/urllib3/issues/659
    * https://github.com/shazow/urllib3/issues/651
    * https://github.com/shazow/urllib3/issues/644
    * https://github.com/kennethreitz/requests/issues/2687

    We could remove this when requests 2.8.0 will be released

    Closes-bug: #1498823
    Change-Id: I7d40ade927b834909e230613777cba1f7537c0ec