Skip to content

Timeouts when publishing messages #111

@funkyboy

Description

@funkyboy

Customer reported frequent timeouts like the following

imeout: The read operation timed out
File "urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "raven/breadcrumbs.py", line 353, in getresponse
rv = real_getresponse(self, *args, **kwargs)
File "http/client.py", line 1197, in getresponse
response.begin()
File "http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "urllib3/contrib/pyopenssl.py", line 294, in recv_into
raise timeout('The read operation timed out')
ReadTimeoutError: HTTPSConnectionPool(host='c.ably-realtime.com', port=443): Read timed out. (read timeout=10)
File "requests/adapters.py", line 440, in send
timeout=timeout
File "urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "urllib3/util/retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "urllib3/packages/six.py", line 686, in reraise
raise value
File "urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "urllib3/connectionpool.py", line 389, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "urllib3/connectionpool.py", line 309, in _raise_timeout
raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
ReadTimeout: HTTPSConnectionPool(host='c.ably-realtime.com', port=443): Read timed out. (read timeout=10)
File "ably/util/exceptions.py", line 77, in wrapper
return func(*args, **kwargs)
File "ably/rest/channel.py", line 118, in publish
timeout=timeout
File "ably/http/http.py", line 196, in post
skip_auth=skip_auth, timeout=timeout)
File "ably/http/http.py", line 31, in wrapper
return func(rest, *args, **kwargs)
File "ably/http/http.py", line 181, in make_request
raise e
File "ably/http/http.py", line 172, in make_request
http_request_timeout))
File "raven/breadcrumbs.py", line 304, in send
resp = real_send(self, request, *args, **kwargs)
File "requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "requests/adapters.py", line 521, in send
raise ReadTimeout(e, request=request)

Python: 3.5.2
Ably-python: 1.0.1

I have been able to reproduce the problem with this script

Metadata

Metadata

Assignees

Labels

bugSomething isn't working. It's clear that this does need to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions