Hello.
We are sometimes experiencing http timeouts when calling our API through cloudscript. This is a http error returned, not a cloud script execution time error.. We've checked and it's not our api returning a timeout.
Is there a way to increase the waiting time for http calls? If we wanted to purchase the extension for cloud script runtime, would that extend the timeouts for http calls as well?
If this is a problem on our end, any advice is appreciated.
Here's my call through cloud script.
let urlPod = baseAccountUrl + "pod/" + podId +apiKey; let body = {WorldId: activeWorldId, LayerId: playerData["layer"]["Value"], AreaId: playerData["area"]["Value"], X: x, Y: y }; http.request(urlPod, "put", JSON.stringify(body), 'application/json', headers);
Here's the error, with the API adress changed for security reasons. As you can see, the script ended after 2 seconds??
{ "EventName": "player_executed_cloudscript", "Source": "CloudScript", "FunctionName": "PlaceMine", "CloudScriptExecutionResult": { "FunctionName": "PlaceMine", "Revision": 445, "FunctionResult": null, "FunctionResultTooLarge": null, "Logs": [ { "Level": "Info", "Message": "{\"WorldId\":\"454b9feb-5970-40bf-89f6-58b13f563f14\",\"LayerId\":30,\"AreaId\":2,\"X\":1,\"Y\":11,\"Mode\":1,\"Type\":0,\"State\":2,\"Value\":0,\"StateExpiration\":\"2018-10-18T09:00:14.529Z\"}", "Data": null }, { "Level": "Error", "Message": "HTTP request error", "Data": { "url": "http://myapilink.net/api/1/pod/4d5ce737-9503-4134-b6a5-b2c28d37b6b2", "method": "put", "content": "{\"WorldId\":\"454b9feb-5970-40bf-89f6-58b13f563f14\",\"LayerId\":\"30\",\"AreaId\":\"2\",\"X\":1,\"Y\":11}", "contentType": "application/json", "headers": { "PlayfabId": "F9549735E56B5591" }, "result": { "responseContent": null, "httpStatus": null, "httpStatusCode": 0, "requestError": "Timeout" }, "httpRequestError": "Timeout" } } ], "LogsTooLarge": null, "ExecutionTimeSeconds": 2.6625984, "ProcessorTimeSeconds": 0, "MemoryConsumedBytes": 85952, "APIRequestsIssued": 2, "HttpRequestsIssued": 4, "Error": { "Error": "CloudScriptHTTPRequestError", "Message": "The script made an external HTTP request, which returned an error. See the Error logs for details.", "StackTrace": "Error\n at handlers.PlaceMine (7BC8-CloudScript.js:971:12)" } }