Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000024771931880>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))

    General Discussion
    0
    20
    139
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      techbytecache @jaideep siddula last edited by

      @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.

      J 1 Reply Last reply Reply Quote 0
      • J
        jaideep siddula @techbytecache last edited by

        @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!

        Mnagesh T 2 Replies Last reply Reply Quote 0
        • Mnagesh
          Mnagesh @jaideep siddula last edited by

          @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

          Now I am full time Algo Trader and successfully developed my own Apps for my personal use.

          J 1 Reply Last reply Reply Quote 0
          • J
            jaideep siddula @Mnagesh last edited by

            @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.

            T 1 Reply Last reply Reply Quote 0
            • T
              techbytecache @jaideep siddula last edited by

              @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 1 Reply Last reply Reply Quote 1
              • T
                techbytecache @jaideep siddula last edited by techbytecache

                @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"

                1 Reply Last reply Reply Quote 0
                • Mnagesh
                  Mnagesh @techbytecache last edited by

                  @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 .

                  Now I am full time Algo Trader and successfully developed my own Apps for my personal use.

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    jaideep siddula @Mnagesh last edited by

                    @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

                    1 Reply Last reply Reply Quote 0
                    • Mnagesh
                      Mnagesh last edited by

                      @techbytecache said in ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000024771931880>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)')):

                      "

                      e6a9dd7d-c3ff-462b-bef1-43e43fe37134-image.png

                      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 !

                      @Moderator_1
                      @Moderator_2

                      Now I am full time Algo Trader and successfully developed my own Apps for my personal use.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        Moderator_1 @Mnagesh last edited by

                        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

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post