My game is nearly ready to launch, but I am occasionally getting reports from beta testers of inexplicable network errors. I've finally managed to track them down, and noticed crazy high execution times in some ExecuteCloudScript calls. For example:
{ "PlayFabEnvironment": { "Application": "logicserver", "Vertical": "master", "Commit": "3142600", "Cloud": "main" }, "CloudScriptExecutionResult": { "FunctionName": "EndRound", "ExecutionTimeSeconds": 18.4062025, "ProcessorTimeSeconds": 0.0, "MemoryConsumedBytes": 292600, "HttpRequestsIssued": 0, "APIRequestsIssued": 0, "Revision": 192, "Error": { "Message": "The script execution was terminated after the maximum execution time limit", "Error": "CloudScriptExecutionTimeLimitExceeded" } }, "FunctionName": "EndRound", "EventNamespace": "com.playfab", "EntityType": "player", "SourceType": "BackEnd", "Timestamp": "2020-11-03T04:42:07.2239080Z", "EventName": "player_executed_cloudscript", "EntityId": "AEE80E559241238C", "EventId": "a44934770d024b71a399971a37ab8a44", "TitleId": "6D4B7", "Source": "CloudScript" }
and
{ "PlayFabEnvironment": { "Application": "logicserver", "Vertical": "master", "Commit": "3142600", "Cloud": "main" }, "CloudScriptExecutionResult": { "FunctionName": "StartRound", "ExecutionTimeSeconds": 65.5883784, "ProcessorTimeSeconds": 0.0, "MemoryConsumedBytes": 12096, "HttpRequestsIssued": 0, "APIRequestsIssued": 0, "Revision": 192, "Error": { "Message": "The script execution was terminated after the maximum execution time limit", "Error": "CloudScriptExecutionTimeLimitExceeded" } }, "FunctionName": "StartRound", "EventNamespace": "com.playfab", "EntityType": "player", "SourceType": "BackEnd", "Timestamp": "2020-11-03T04:44:21.0086008Z", "EventName": "player_executed_cloudscript", "EntityId": "AEE80E559241238C", "EventId": "10735606d1414239903c2ab07f85b923", "TitleId": "6D4B7", "Source": "CloudScript" }
18 seconds for one, and then a whopper 65 second execution time. The 65s StartRound request is particularly mind boggling, because it's an incredibly simple handler:
handlers.StartRound = function (args) { var currentRoundId = randomId(); server.UpdateUserReadOnlyData({ PlayFabId: currentPlayerId, Permission: "public", Data: { LastRoundId: currentRoundId, LastRoundStartTime: (new Date().toUTCString()) } }); return { RoundId: currentRoundId }; };
Taking a look at my Cloud Script Processing times, you can see these two failed requests just before 21:00. Around that time, I also noticed a DownstreamServiceUnavailable error, which I don't know is related. StartRound doesn't have any downstream services that I know of.
Anybody have any ideas what might be causing these high execution times?