]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commit
client: workaround socket leak wip-socket-leak 15/head
authorJosh Durgin <jdurgin@redhat.com>
Tue, 23 Dec 2014 06:16:36 +0000 (01:16 -0500)
committerJosh Durgin <jdurgin@redhat.com>
Sat, 27 Dec 2014 05:06:50 +0000 (21:06 -0800)
commit0006172cd793d20f2a198b243f74ada5ed4c5e5c
tree17984b41e654301dcd46bdbbb72f5312f887a496
parentfbcc4382cb5c2696b60e842e50aba2c652ca3a43
client: workaround socket leak

Recreate the boto connection object after every 512 requests in an
attempt to workaround a socket leak when the remote end closes the
connection. Boto does not seem to be causing httplib to close() the
sockets appropriately in some cases. I'm not sure exactly where
the leak is occurring, but forcing boto to reinitialize its
connection pool like this avoids it.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
radosgw_agent/client.py
radosgw_agent/tests/test_client.py