KeepAlive Timeouts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BobboMcJobbo.
    Junior Member
    • May 2014
    • 1

    #1

    KeepAlive Timeouts

    Hi All,

    Before I go to Betfair, thought I would ask in here first.

    I have a .NET application that "attempts" to keep my SSOID alive by pinging the KeepAlive url at 15 minute increments.

    Upon startup, it is fine, but after it has been running a while, I receive exceptions stating: "the operation has timed out".

    After hit and miss of around 6 hours, it times out on every call until I close and restart my application.

    Any idea's anybody? Is anybody else having a similar issue?
  • BigSprout
    Junior Member
    • Feb 2011
    • 60

    #2
    Hi Mate,
    I have tested the KeepAlive function and now use it on rare occasions.

    There is no need to ping it every 15 minutes if you are calling any routines - I am calling ListMarketBook every second which negates any requirement for KeepAlive.

    I have also switched off (without Logging out) for days at a time and KeepAlive has logged me back in using my previous ssoid so there is no real need to keep using it.

    Hope this helps,
    Les

    Comment

    • OliasOfSunhillow
      Junior Member
      • Feb 2013
      • 57

      #3
      If KeepAlive is unreliable why not just login at 15 minute intervals

      Comment

      • bnl
        Junior Member
        • Nov 2012
        • 108

        #4
        Timeout of 2 minutes. KeepAlive on Timeout

        2014-05-09 17:35:25.556 Main. : Start receive
        2014-05-09 17:37:25.556 Main. : Timeout
        2014-05-09 17:37:25.588 RPC.Keep_Alive : {"token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx=","product":"","status":"SUCCESS","error":""}
        2014-05-09 17:37:25.592 Main. : Start receive
        2014-05-09 17:39:25.592 Main. : Timeout
        2014-05-09 17:39:25.644 RPC.Keep_Alive : {"token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx=","product":"","status":"SUCCESS","error":""}
        2014-05-09 17:39:25.644 Main. : Start receive
        2014-05-09 17:41:25.644 Main. : Timeout
        2014-05-09 17:41:25.688 RPC.Keep_Alive : {"token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx=","product":"","status":"SUCCESS","error":""}


        /Björn

        Comment

        • Oscar Jack
          Junior Member
          • Nov 2013
          • 9

          #5
          Either the KeepAlive functionality does not work as documented or I just misunderstand its use.

          When I first saw it I thought you would only need to call it if you were not calling any other requests within 20 minutes, but the Login FAQs page states otherwise:

          Q. Why does my session time out, even though I’ve been retrieving prices?
          A. For security reasons, we require that the application using the API explicitly calls the keep-alive operation no more than once every 7 minutes in a response to user activity. In the case of non-interactive applications, these should call the keep-alive operation every 7 minutes whilst they are active.


          That answer confuses me even more.

          Last year someone posted the question:
          Is KeepAlive currently necessary to keep the session open? I've been idle for far longer than 20 minutes and all my auth details still work for new requests.

          The answer by BDP was:
          20 minutes is the minimum session expiry time, so for the avoidance of doubt you should keep your session alive within the 20 minutes window if you don't want your session to expire while making API-NG requests.

          So if the session expiry time is not fixed how can we test whether KeepAlive works. May be it is currently set to 20 days or it is set to not timeout at all.

          I have coded my program to call KeepAlive every 15 minutes regardless, as I think that is what might be intended, and I fear that at some point the 20 minutes timeout will come into force.

          Comment

          • robne2000
            Junior Member
            • May 2013
            • 19

            #6
            I had a similar problem, so fixed it by logging in and out at regular intervals.

            Comment

            • arteny1
              Junior Member
              • Jul 2014
              • 17

              #7
              BDP Support, please answer

              Betfair support, there are lot of similar questions on forum about INVALID_SESSION_INFORMATION error even when calling KeepAlive withing each 12 hours as described in rules.
              Could you clear how KeepAlive should be used?

              Comment

              • betdynamics
                Junior Member
                • Sep 2010
                • 534

                #8
                Out of interest, how often are you calling KeepAlive ?

                Comment

                • gus
                  Senior Member
                  • Jan 2009
                  • 134

                  #9
                  I call keepAlive every 15 minutes.

                  I use Interactive LogIn, and my Bot can spend hours making no calls (other than the keepAlives) between logging-in to set-up my Triggers in the morning and starting to monitor markets/submit bets etc when the first UK/Irish horse races are due start in the afternoon, and I've never yet had time-outs unless there's been a prolonged API downtime... and that's for the last 10 months.

                  So something's working .... either the ssoid isn't expiring or the keepAlive calls are refreshing it, though to be honest, I don't know which!

                  Comment

                  • betdynamics
                    Junior Member
                    • Sep 2010
                    • 534

                    #10
                    Same here - I call it every 15 minutes and don't seem to suffer any INVALID_SESSION_INFORMATION problems.

                    Comment

                    • arteny1
                      Junior Member
                      • Jul 2014
                      • 17

                      #11
                      Originally posted by betdynamics View Post
                      Same here - I call it every 15 minutes and don't seem to suffer any INVALID_SESSION_INFORMATION problems.
                      It was my fault, I didn't specified Accept: json
                      Last edited by arteny1; 22-11-2014, 12:18 AM. Reason: Found a solution

                      Comment

                      Working...
                      X