question

garth avatar image
garth asked

CloudScript Processing Time spiked a couple days in a row

Our players received error messages yesterday and today due to spikes in CloudScript processing times. It seems this occurred for all CloudScript functions, and was not limited to a single function call. The PlayFab Status Report page seems to indicate no problems with CloudScript recently.

What can we do make these spikes occur less often? Is there some debugging step we should take to determine the cause?

This has also been submitted as Case 120102121002977.

CloudScript
qpbni.png (16.9 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

The API graph is the best place to start. You appear to be getting APIConcurrentRequestLimitExceeded errors at the same time. That error indicates that the available Cloud Script engines are all being consumed for your title, which usually only occurs if a) the title is using Cloud Script at a high rate per player on an ongoing basis, or b) one or more handlers are using http.request() to hit an external resource which is slow to respond (in which case, the script has to idle, waiting on a response, which eats up one V8 engine while it's waiting). In that circumstance, some scripts will be queued and run once servers are freed up, but you'll have others rejected with the concurrent request error message.

We highly recommend moving your scripts to the newer Azure Functions integration. While our legacy Cloud Script hosting does scale with usage, Azure is far more flexible in term of total resources available on a per-title basis. And running in Azure, you can use Azure Functions Premium, which eliminates cold starts by always having extra resources available for the title.

In the short term, please work with the support team via the ticket you have open to see about getting a vertical set up that can provide added capacity to help with the immediate issue.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

garth avatar image
garth answered

Thank you for your reply!

Where can I see these APIConcurrentRequestLimitExceeded errors? I'm not sure which "API graph" you are referring to.

I am looking at the Cloud Script Overview under the Automation page, and the most common error is CloudScriptExecutionTimeLimitExceeded followed by InternalServerError. I don't see any errors named APIConcurrentRequestLimitExceeded.

The closest sounding error, CloudScriptAPIRequestError only occurred a few times. Looks like nine times in the past day, compared to hundreds of occurrences for InternalServerError.

We will also review any HTTP requests we have, and research Azure Functions for future implementation, though we do have some concerns this is listed as "Functions (Preview)" in the PlayFab dashboard.






aksjf.png (99.2 KiB)
ioyyd.png (100.3 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.