Start a new topic

Kinvey operation timeouts happening too often in our app

We had our busiest (but not terribly busy compared to big name apps) weekend (November 16-17) with our app and we had an extraordinarily high percentage of operations showing timeouts in our error logs - 6% - with a timeout of 20 seconds. We're using the Titanium API with the 3.1.3 SDK and all of the timeouts were reported on iOS.



Our questions:



How long of a timeout period should we allow for relatively simple Kinvey query operations on small databases (under 1000 entries)?



Were there system problems this weekend that might have caused these timeouts?



Any other suggestions?



I was frankly stunned when I reviewed our error logs and saw such a high percentage, and some of our customers gave up trying to use the app and sent us emails with the data they were trying to post.



This was our biggest weekend and it wasn't exactly a confidence builder for our customers.

No, we did not have system problems. The average latency of a request to Kinvey (across all apps) is below 50ms (and stayed this way during that weekend). You mention that all the timeouts were reported on iOS - does that mean you also have an Android version which did not have timeouts? If so, then the backend must have performed fine. Were the timeouts localized to a few users? Do you have any additional analytics that could give you additional clues about them, i.e. location?



For timeouts triggered at 20s on small requests the most likely cause is connectivity issues. Most end users are aware when they have low/poor connectivity, but not all do, and for a 6% error rate, all you need is 6 users for every 100 to be unaware that they are too far away from the WiFi. Does your testing methodology account for connectivity issues?



What is exact error message returned as part of the timeout event? Can you reproduce the timeouts now?
Our Android app did not log errors during the same period.



I'm on an airplane but my team can provide more answers



We have, in general, experienced slow Kinvey query performance even on WiFi so that has been an ongoing concern
My app was having an increase in timeout activity last week as well. I tried to do some troubleshooting but everything seemed fine on the app end. I do not have any analytics on the subject just some emails and my boss freaking out because he could not use the app for like 2 hours off and on, but it worked fine for me.
Here are some error log entries from yesterday... we're still having problems.

Yesterday, 11% of our sessions had errors.

We're not talking about a very busy app so this really bothers me and it is obviously bothering our customers.



We've expanded the timeout to 30 seconds but we're worried that people are just going to think the app is broken and remove it.



For what its worth, most of our users are in the SF Bay Area stretching down the coast to Morro Bay.

Almost all of our main usage areas have 4G or LTE or local WiFi service.



Again, we're doing very simple queries of relatively small collections (not geo-queries)



11/21/13 14:11 1 Titanium thrown error: {"name":"RequestTimeoutError","description":"The request timed out.","debug":"timeout"} 2.07.0 crabline iPhone

11/21/13 10:38 3 Titanium thrown error: {"name":"RequestTimeoutError","description":"The request timed out.","debug":"timeout"} 2.07.0 crabline iPhone

11/21/13 10:38 2 Titanium thrown error: {"name":"RequestTimeoutError","description":"The request timed out.","debug":"timeout"} 2.07.0 crabline iPhone

11/21/13 10:38 1 Titanium thrown error: {"name":"RequestTimeoutError","description":"The request timed out.","debug":"timeout"} 2.07.0 crabline iPhone

11/21/13 9:17 1 Titanium thrown error: {"name":"RequestTimeoutError","description":"The request timed out.","debug":"timeout"} 2.07.0 crowdFish iPhone

11/21/13 9:16 2 Titanium thrown error: {"name":"RequestTimeoutError","description":"The request timed out.","debug":"timeout"} 2.07.0 crowdFish iPhone

11/21/13 9:16 1 Titanium thrown error: {"name":"RequestTimeoutError","description":"The request timed out.","debug":"timeout"} 2.07.0 crowdFish iPhone

11/21/13 8:52 1 Titanium thrown error: {"name":"RequestTimeoutError","description":"The request timed out.","debug":"timeout"} 2.07.0 crowdFish iPhone
Here are some code fragments of our most frequent query:



var myPriceQuery = new Kinvey.Query();

myPriceQuery.equalTo('itemA', dataVar.thing);

myPriceQuery.equalTo('itemB', dataVar.place);

// sort the query results

myPriceQuery.ascending('price');

myPriceQuery.greaterThanOrEqualTo('_kmd.lmt', limstr).lessThanOrEqualTo('_kmd.lmt', nowstr);

var promise = Kinvey.DataStore.find('stuff', myPriceQuery, {

timeout : 30 * 1000

});



And this is timing out 2-11% of the time every day for the last week or so.
Login or Signup to post a comment