As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Is there a way to guarantee an endpoint responds within 2 second window?
D
Daniel Roizman
started a topic
over 9 years ago
My endpoint is getting pretty complicated with rankings and data merging. I'd like to use setTimeout function so that wherever my computation is at, it ends and returns whatever results have been computed. But setTimeout is not supported.
Can you provide an example of what you are trying to do and what you want to use setTimeout to achieve? Also - we do offer plans that have higher BL Execution timeouts if that would be more suitable for your use case.
D
Daniel Roizman
said
over 9 years ago
When I get back 100 records in BL, I do a bunch of processing on the data - calculate popularity, reorder some things, etc. I don't have to do all the computation and return 100 records, it would be ok to just return 50 if time ran out.
Another solution would be for Kinvey to provide an initialized timer with the BL. We could then test elapsed time and cleanup and exit before time runs out.
M
Michael
said
over 9 years ago
The best thing to do is try to look for efficiencies in your BL, and use the async module where possible. Many times, these manipulation functions can be optimized to fit well within the 20-second timeout.
D
Daniel Roizman
said
over 9 years ago
I'm on the 2 second timeout plan!
M
Michael
said
over 9 years ago
Sorry - that was just a typo. I meant 2-seconds.
D
Daniel Roizman
said
over 9 years ago
If I use Google App Engine, do I still have a 2 second timeout?
Daniel Roizman