ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000024771931880>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))
-
Why we are getting below error every other day, is there no solution for this ?
HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/historical/v1/getCandleData (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000024771931880>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))
-
Hello @Mnagesh @techbytecache @jaideep-siddula ,
Apologies for the inconvenience. Rest assured, we are working on this issue for a fix.
Thank you
Regards
SmartAPI Team -
@techbytecache said in ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000024771931880>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)')):
"
this error comes very frequently . kindly fix .
in spite of taking care of exemption handling and rate limits still we get this types of error during getcandels or ltp ! -
@Mnagesh @techbytecache @Moderator_2
What I think is yes, there is scope for improvement in the API. I totally agree with you. I am just wondering, have you tried APIs from any other brokers? Would be happy if you shared your experience.
Regards,
Jaideep Siddula -
@techbytecache
why 30 sec ?
0.35 sec is enough to match the rate limit
30 sec is too delayed and not suite for intraday traders . -
@jaideep-siddula You folks don't read user posts properly. See @Mnagesh has already mentioned "in spite of talking care of rate limites and exception handling"
-
@jaideep-siddula You missed in my post I mentioned " I have set timeout to 30 seconds in SmartConnect.py still getting these errors." You are right infra may fail but should not fail this frequently for such critical financial applications. I got timeout errors 9 times on 12th April. Your timeouts may cause losses and may result in heavy losses if the position is not exited on time. And since this error is happening with a lot of folks who are using Angel APIs it is for sure something on Angel side which needs improvement if you want customers to stick with you.
-
@Mnagesh
Hope you're doing well. You could simply use try, except, finally(If you're using python) statement in your code. So, when a error is raised, the code tries again instead of raising it and ending the program. Hope this helps. -
@jaideep-siddula yes timeout error is occurring frequently and it is annoying in spite of talking care of rate limites and exception handling.
@Moderator_2
@Moderator_1 -
@techbytecache
Time Out Error is raised when the code is executed. The error can be tackled if you're good at handling exceptions and make the code work according to your use case. This comes handy building any application. We can not really depend on the infrastructure of the communication systems. They are bound to fail at times. In this example, you can change in the time out to 15 seconds, instead of 7 seconds which is the default. Cheers! -
@jaideep-siddula I understand what you are saying and meaning of the error but that doesn't answer why every other day we get TimeOut errors from your servers. You can see from my logs it happened multiple times yesterday. Also want to share it worked very well today with no timeout whole day. You need to look at increasing your infra etc to be able to take on the incoming traffic without getting unresponsive.
-
@techbytecache
It seems there was an error with making a POST request to the specified URL (https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData). The error message indicates a connection timeout issue, suggesting that the connection to apiconnect.angelbroking.com took longer than the specified timeout period (30 seconds in this case).Error Type: ConnectTimeoutError
Host: apiconnect.angelbroking.com
Port: 443 (standard HTTPS port)
URL Path: /rest/secure/angelbroking/historical/v1/getCandleData
Request Type: POST
Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': 'xxxxxxxxxxxxxxxxxxxxxx'}
Possible reasons could beRetry: Sometimes, the error could be transient. Simply retrying the request after a short delay might succeed.
Check Network Connection: Ensure that the network connection from your end is stable and there are no issues with connectivity.
Server Status: Check if the server (apiconnect.angelbroking.com) is operational and not experiencing any downtime or maintenance.
Increase Timeout: If this issue persists, you might consider increasing the timeout value in your request to allow more time for the connection to establish.
Contact Support: If none of the above steps work, you may need to contact the support team of angelbroking.com for further assistance, as the issue might be specific to their infrastructure.
Hope this helps.
Regards,
Jaideep Siddula -
@Moderator_2 Please update how to fix this. My SDK version is 1.4.1
Today again I got multiple errors. I have set timeout to 30 seconds in SmartConnect.py still getting these errors.
[E 240409 09:18:46 smartConnect:210] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/getLtpData. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
[E 240409 09:41:33 smartConnect:210] Error occurred while making a GET request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/getOrderBook. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/getOrderBook?%7B%7D (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000016197836610>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=30)'))
[E 240409 09:43:40 smartConnect:210] Error occurred while making a GET request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/getOrderBook. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Read timed out. (read timeout=30)
[E 240409 09:45:22 smartConnect:210] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
[E 240409 10:08:00 smartConnect:210] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/getLtpData. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/getLtpData (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001619795E250>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=30)'))
[E 240409 10:11:50 smartConnect:210] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/getLtpData. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/getLtpData (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001619795E150>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=30)'))
[E 240409 10:12:44 smartConnect:210] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Read timed out. (read timeout=30)
[E 240409 10:17:56 smartConnect:210] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Read timed out. (read timeout=30)
[E 240409 10:26:23 smartConnect:210] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData. Headers: {'Content-type': 'application/json', 'X-ClientLocalIP xxxxxxxxxxxxxxxxxxxxxx Response: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/historical/v1/getCandleData (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x00000161954A87D0>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=30)')) -
@Moderator_2 it is 1.3.5
-
-
@Moderator_2 Even after two months issue persists. Why don't you shut down API service if cannot make it work?
2024-03-11 14:45:47 **Outer Loop Exception occured HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/getOrderBook?%7B%7D (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001C569090890>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)')) HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/getOrderBook?%7B%7D (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001C569090890>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)')) HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/getOrderBook?%7B%7D (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001C569090890>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)')) Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 200, in _new_conn sock = connection.create_connection(
-
@Moderator_2 Is there any update on this? Been a week since this started. I see multiple posts on the forum as well but no fix yet
-
@Moderator_2 This issue continues to persist even while just logging in through api.
-
@Raj-Karande Yes, I can confirm from past one week this is ongoing with no fix yet. it was all fine before a week, looks something changed from their end.
-
hi @Raj-Karande
Apologies for inconvenience caused.
We are working on the issue.Thanks & Regards,
SmartAPI team