Is it a problem if a CloudScript execution time limit is exceeded too often? We're developing a game which retrieves data from an external party (via scheduled tasks). But it can happen that - for whatever reason - the external party's server is a little slow, which results in exceeding the execution time limit. Is it a problem if this happens every now and then (it's not called by clients, only tasks) or do we need to up the limit (pretty) high in case of a (sometimes) slow external party server?
Answer by Brendan · Jul 18, 2017 at 10:02 PM
When you hit the limit of the Cloud Script execution time, the script exits at that point, which could potentially leave your logic in a state where you've taken some actions, but not others. So it's always advisable to do good testing on your handlers to check their runtimes, so that you make sure you're not getting too close to the limit.
Now, in the case of a dependency on a third-party, you're not the first person to run into this. If you can't make the third-party call from the client, and moving to using custom game servers isn't an option, we can work with you on moving your title to use a private vertical of the Cloud Script logic servers, as an addendum to a pro or enterprise tier contract.
Thanks for the reply. Is it for you (PlayFab) a problem if now and then a CloudScript exceeds the limit (in the sense of actions will be taken if exceeded too often)? Or is it only disadvantageous for us (since our logic could break).
Obviously, the more calls a title makes per player, the more costly the title is for us to sustain. In the case of the free tier, we have few options to assist you if things go wrong, since with zero revenue for those titles, we aren't able to provide much individual resource time to them (not to mention the fact that we're contractually obligated to make sure our pro/enterprise folks are unblocked first). That's specifically why the free tier has no service level agreement or private support - the resource time that would be required.
Also, the more titles that do this, the more we would have to restrict the free tier, potentially to the point of having to remove it, if we found that there were too many titles in that tier hammering the service with requests.
So short answer - if you're hitting the limit more than rarely, you should really be checking to see why, and working to fix the issue.