requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='', port=443): Read timed ou

Facing the above issue very frequently from last two days. And APIs are throwing this issue intermittently
  • dknaix
    Same issue Facing, i thought changing the network will resolve but facing issue on AWS Cloud too
  • rakeshr
    @sriraj1122 @dknaix
    Can you paste log for such requests? Is any specific API end-point throwing this?
  • sriraj1122
    @rakeshr Here is the log
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/kiteconnect/", line 574, in quote
    [2022-11-10 12:34:36] data = self._get("market.quote", params={"i": ins})
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/kiteconnect/", line 826, in _get
    [2022-11-10 12:34:36] return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/kiteconnect/", line 877, in _request
    [2022-11-10 12:34:36] raise e
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/kiteconnect/", line 865, in _request
    [2022-11-10 12:34:36] r = self.reqsession.request(method,
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/requests/", line 61, in request
    [2022-11-10 12:34:36] return session.request(method=method, url=url, **kwargs)
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/requests/", line 542, in request
    [2022-11-10 12:34:36] resp = self.send(prep, **send_kwargs)
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/requests/", line 697, in send
    [2022-11-10 12:34:36] r.content
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/requests/", line 831, in content
    [2022-11-10 12:34:36] self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
    [2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/requests/", line 760, in generate
    [2022-11-10 12:34:36] raise ConnectionError(e)
    [2022-11-10 12:34:36] requests.exceptions.ConnectionError: HTTPSConnectionPool(host='', port=44

    This came for quote api
  • sriraj1122
    @rakeshr Any help regarding the above issue ?
  • rakeshr
    We checked the logs but doesn't seem to happen at the server level. Maybe you will have to inspect your local connection for these timeouts.
  • sriraj1122
    @rakeshr I am running the application on two servers one on AWS and another on Digital ocean. Both are having the same issue.
  • rakeshr
    rakeshr edited November 2022
    Are you polling Quote APIs?
    If yes, maybe you can add some delay and inspect.
  • sriraj1122
    sriraj1122 edited November 2022
    Why should we do that. is it due to rate limits ?
    Even for rate limits it shouldn't through 443 exception right ?
  • rakeshr
    As informed above it's not universal and not getting caught in our logs. So, you might have to debug this on your end.
  • sriraj1122
    Looks like it resolved now... APIs are working fine now
This discussion has been closed.