Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
kennethreitz/requests issue 3239
Some requests receive a Response but keep the socket in
CLOSE_WAIT state until process is killed .
Some requests raise ConnectionError after some time and
seem to block others unprocessed spawned requests until
all ConnectionError are not raised .
(all http connection pool slots are busy ?)
from gevent import monkey
import gevent
import requests
def http_req(x):
r ='')
print "Request ", x, r
if __name__ == '__main__':
reqs = [ gevent.spawn(http_req, x) for x in range(10) ]
print "waiting end of greenlets ..."
print "sleeping for 120 sec"
Copy link

mygoda commented Jan 23, 2016

do you have any solution for this problem,i struck in it so many time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment