I have some code where I make three or four Kinvey server calls in quick succession (with the callback of one triggering the next call). This usually executes in a second, but sometimes (maybe 10% of the time) one of the callbacks will take 1 to 2 minutes. It's not the same call each time. Sometimes it's a user query. Other times it's a custom endpoint.
The callback always ends up completing eventually without error, but the 1 to 2 minute wait is problematic. I can actually make other Kinvey calls and get callbacks while I'm waiting too. Any thoughts?
It's strange that it would be sometimes and not others. We need to dig in a bit deeper here to figure out what could be causing it... Are you able to share the code on here?
over 5 years ago
Thanks for the message, Caroline. The code in question involves quite a few methods plus a custom endpoint, so it's not very easy to post here without a lot of explanation. If I'm able to reproduce the problem with a more compact chunk of code, that will be easier for us to breakdown. I'll keep you posted. Thanks!
about 5 years ago
So we've been putting off this problem for a while, but we're about to start beta testing the game, and are trying to resolve it again. I've actually been able to duplicate the error with really basic Kinvey commands.
As a test, I set-up code to call "loadObjectWithID" 3 times in a row (the second call is called in the callback of the first call, and the third call is called in the callback of the second call). If I initiate this sequence over and over, I eventually get stuck waiting on a callback. It can get stuck on any of these calls, including the first one.
It generally gets stuck about 1 in 50 times during this sequence.
This only seems to happens in iOS 7, not iOS 8.
When it gets stuck, the callback always happens exactly 1 minute and 1 second later.
I can recreate the same problem calling custom endpoints instead of regular Kinvey commands. With custom endpoints, the delay seems to be in sending the call to the server, as opposed to receiving the callback info (based on logs in the custom endpoints as well as Xcode). Again, this is in iOS 7, and the lag is 1 minute and 1 second (plus or minus a fraction of a second).
I'm using Kinvey 1.28.0, although the problem occurred on earlier version as well.
Thanks for any help!