☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
998
Java client
1.1K
API clients
404
PHP client
4K
Python client
347
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
November 2022
sriraj1122
November 2022
rakeshr
November 2022
dknaix
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed ou
sriraj1122
November 2022
in
Python client
Facing the above issue very frequently from last two days. And APIs are throwing this issue intermittently
dknaix
November 2022
Same issue Facing, i thought changing the network will resolve but facing issue on AWS Cloud too
rakeshr
November 2022
@sriraj1122
@dknaix
Can you paste log for such requests? Is any specific API end-point throwing this?
sriraj1122
November 2022
@rakeshr
Here is the log
[2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/kiteconnect/connect.py", 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/connect.py", 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/connect.py", 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/connect.py", 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/api.py", 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/sessions.py", 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/sessions.py", 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/models.py", 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/models.py", line 760, in generate
[2022-11-10 12:34:36] raise ConnectionError(e)
[2022-11-10 12:34:36] requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.kite.trade', port=44
This came for quote api
sriraj1122
November 2022
@rakeshr
Any help regarding the above issue ?
rakeshr
November 2022
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
November 2022
@rakeshr
I am running the application on two servers one on AWS and another on Digital ocean. Both are having the same issue.
rakeshr
November 2022
edited November 2022
Are you polling Quote APIs?
If yes, maybe you can add some delay and inspect.
sriraj1122
November 2022
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
November 2022
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
November 2022
Looks like it resolved now... APIs are working fine now
This discussion has been closed.
Can you paste log for such requests? Is any specific API end-point throwing this?
[2022-11-10 12:34:36] File "/usr/local/lib/python3.9/site-packages/kiteconnect/connect.py", 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/connect.py", 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/connect.py", 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/connect.py", 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/api.py", 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/sessions.py", 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/sessions.py", 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/models.py", 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/models.py", line 760, in generate
[2022-11-10 12:34:36] raise ConnectionError(e)
[2022-11-10 12:34:36] requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.kite.trade', port=44
This came for quote api
If yes, maybe you can add some delay and inspect.
Even for rate limits it shouldn't through 443 exception right ?