Timeout errors happening


  • @c_harish

    Correct. This issue is not about exceeding the rate access limit of 10 per second. Even my program sleeps for 1 second after sending 10 requests. My script also polls only once a minute. Currently I'm only polling for 'ltp' for 4 scrips, which is well within the limit. This issue is clearly about 'http' timeouts happening at the server level and not due to the script.

    It's now past 12:18, the issue seems to have stopped and the script is running as before. I wonder if it will occur again at 1:08.


  • @Mnagesh, we know this. and we don't cross any of the suggested rate limits as I said in last post.


  • @c_harish

    getltp is limited to 10 per sec

    so just above that time will be okay

    1/10 = 0.1 sec

    so
    i use sleep of
    0.15 sec

    in case of time out

    Sr. No API Name Throttling Limit Rate (Request/Second)
    1 loginByPassword 1
    2 getProfile 1
    3 logout 1
    4 generateTokens 1
    5 placeOrder 10
    6 modifyOrder 10
    7 cancelOrder 10
    8 getLtpData 10
    9 getOrderBook 1
    10 getTradeBook 1
    11 getRMS 1
    12 getHolding 1
    13 getPosition 1
    14 convertPosition 10
    15 getCandleData 3
    16 createRule 10
    17 modifyRule 10
    18 cancelRule 10
    19 ruleDetails 1
    20 ruleList 1


  • It started happening again @ around 12:10 pm.

    Please check, something is not right today. Everything was working until today.


  • @pari Good observation..

    It got resolved at 12:18..


  • @Mnagesh said in Timeout errors happening:

    @c_harish timeout problem is common
    give some sleep time and put it in a loop to resolve the issue as per rate limits specified by smartapi . Use exception handling for timeout issue
    eg:
    d58f0a1d-5e9b-4cce-a78f-ee352b2b0063-image.png

    please suggest us how long to put our script to sleep? because today we have waited for a total of 16 mins inside sleep for angel to come back up? and FYI, we never cross the rate limits provided in documentation.


  • This issue is occurring again at 12:08. Faced this at 11:08 and got resolved automatically in 10 minutes. This has recurred exactly in one hour. Need to observe if it will resolve itself by 12:20.


  • @c_harish said in Timeout errors happening:

    @StocksDeveloper @admin. We too faced it. started from 11:00 and got resolved by 11:18.

    requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/user/v1/getProfile?%7B%22refreshToken%22:%20%22eyJhbGciOiJIUzUxMiJ9.eyJ0b2tlbiI6IlJFRlJFU0gtVE9LRU4iLCJpYXQiOjE2NTk2NzA1MDJ9.2MBQxy2dPQVt4RQQ6bk51SCDJmSQLIidW571CB0BhvE5yvZPcz7S_7uSwL00szX4zvWVFvSBqxRnMIPz7NDECQ%22%7D (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f2335508d50>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))
    
    
    
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/user/v1/getProfile?%7B%22refreshToken%22:%20%22eyJhbGciOiJIUzUxMiJ9.eyJ0b2tlbiI6IlJFRlJFU0gtVE9LRU4iLCJpYXQiOjE2NTk2NzA1MDJ9.2MBQxy2dPQVt4RQQ6bk51SCDJmSQLIidW571CB0BhvE5yvZPcz7S_7uSwL00szX4zvWVFvSBqxRnMIPz7NDECQ%22%7D (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f2335508d50>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))
    

    @admin it is not looking good. why is this happening too often now?

    now happening again @admin. Don't force us to take the harsh decision of moving out.


  • @c_harish timeout problem is common
    give some sleep time and put it in a loop to resolve the issue as per rate limits specified by smartapi . Use exception handling for timeout issue
    eg:
    d58f0a1d-5e9b-4cce-a78f-ee352b2b0063-image.png


  • @StocksDeveloper @admin. We too faced it. started from 11:00 and got resolved by 11:18.

    requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/user/v1/getProfile?%7B%22refreshToken%22:%20%22eyJhbGciOiJIUzUxMiJ9.eyJ0b2tlbiI6IlJFRlJFU0gtVE9LRU4iLCJpYXQiOjE2NTk2NzA1MDJ9.2MBQxy2dPQVt4RQQ6bk51SCDJmSQLIidW571CB0BhvE5yvZPcz7S_7uSwL00szX4zvWVFvSBqxRnMIPz7NDECQ%22%7D (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f2335508d50>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))
    
    
    
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/user/v1/getProfile?%7B%22refreshToken%22:%20%22eyJhbGciOiJIUzUxMiJ9.eyJ0b2tlbiI6IlJFRlJFU0gtVE9LRU4iLCJpYXQiOjE2NTk2NzA1MDJ9.2MBQxy2dPQVt4RQQ6bk51SCDJmSQLIidW571CB0BhvE5yvZPcz7S_7uSwL00szX4zvWVFvSBqxRnMIPz7NDECQ%22%7D (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f2335508d50>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))
    

    @admin it is not looking good. why is this happening too often now?