question

Dusan Lazarevic avatar image
Dusan Lazarevic asked

A lot of CloudScriptExecutionTimeLimitExceeded errors

I have a custom webhook call from cloud script. It's triggered from a rule when item inventory is added. It's important function for my title as the data it passes to the web shouldn't be missed. And right now, those webhooks are missed most of the time

The script is very basic, and it has just one http request at the end, not returning anything from the function, so it doesn't wait for success on http request. It shouldn't last more than 100th of a second to execute. And I get execution times of more than 2.5 seconds.

Can you please check and tell me what's happening? It looks to me more like a forcing to go to paid PlayFab account than to real execution time issue?

Function: handlers.sendWebHook

Title: BEA20

Rule ID: C58E2A443C1DE878

Event History: look for player_triggered_action_executed_cloudscript


As I said, it's not some trivial reporting script I am executing, it's very important for me for that request to execute, as I am collecting data on the end of the hook

Thanks

CloudScriptdatawebhooks
10 |1200

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

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

The http.request call timeout is 2.5 seconds. If your service does not return within that period, the call will timeout, causing the script to fail. Network latency isn’t controllable always. The latency of your own IP address is also different than the latency of PlayFab server. Sometimes network situation will cause the timeout calls. A longer timeout limit isn’t the key point of ensuring sending the http request successfully. The possible workaround is recording the client info which you need on the client local cache temporarily until the http request is sent successfully. You can try to add some double check mechanism instead of totally depending on the low network latency or a longer timeout limit.

1 comment
10 |1200

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

Dusan Lazarevic avatar image Dusan Lazarevic commented ·

Thanks for clarification. Though, that 2.5 secs limit should probably be a little higher, as it can always happen that http hook connection is slow

0 Likes 0 ·

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.