boto/boto — Issue #564: Boto connection timeout
Author: MikeBrooks
Created: 2012-02-07 23:45:48+00:00
State: open

My program uses SQS a lot over the course of many days. I have noticed that my program will fall to 0% cpu usage and just get stuck their for a long time. When the program is suck i can debug it to obtain the following stack trace. It appears as though the socket isn't timing out properly. I think the best solution is to expose httplib's timeout value on Boto's connection object so that I can lower it. What does the Boto community think?

File "/usr/lib/pymodules/python2.7/boto/sqs/queue.py", line 245, in get_messages
attributes=attributes)

File "/usr/lib/pymodules/python2.7/boto/sqs/connection.py", line 157, in receive_message
queue.id, queue)

File "/usr/lib/pymodules/python2.7/boto/connection.py", line 605, in get_list
response = self.make_request(action, params, path, verb)

File "/usr/lib/pymodules/python2.7/boto/connection.py", line 592, in make_request
headers=headers)

File "/usr/lib/pymodules/python2.7/boto/connection.py", line 461, in make_request
return self._mexe(method, path, data, headers, host, sender)

File "/usr/lib/pymodules/python2.7/boto/connection.py", line 395, in _mexe
response = connection.getresponse()

File "/usr/lib/python2.7/httplib.py", line 1027, in getresponse
response.begin()

File "/usr/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()

File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline()

File "/usr/lib/python2.7/socket.py", line 430, in readline
data = recv(1)