question

contact-5 avatar image
contact-5 asked

Lots of timeouts with Playfab APIs when called from Azure functions

We are getting lots of timeout issues with APIs.

We've been operating the game for 6 months, and so far it worked well. However, suddenly we are getting extremely many timeout issues with APIs recently (like the last 3 days).

Our project is using Playfab Automation to receive users' requests, and then it calls Azure functions. Then, each Azure function runs the logic and then calls Playfab APIs to load/save data.

We checked playfab api calls limits per seconds, mins, or other possible limits but it shows it didn't hit the limit ever. The log (from Azure function) shows there are tons of connection errors.

We are still investigating issues, but I want to know if there are increased timeout or other possible error logs for the titles: 7F7F6 and 4E461.

Here are some logs.

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.Economy ---> Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException: Result: Failure Exception: {"code":503,"status":"Service Unavailable","error":"Connection error","errorCode":2,"errorMessage":"connect ETIMEDOUT 20.120.128.232:443"} Stack: Error: {"code":503,"status":"Service Unavailable","error":"Connection error","errorCode":2,"errorMessage":"connect ETIMEDOUT 20.120.128.232:443"} at t.ensureErrorType (C:\Program Files (x86)\SiteExtensions\Functions\4.27.5\workers\node\dist\src\worker-bundle.js:2:30427) at C:\Program Files (x86)\SiteExtensions\Functions\4.27.5\workers\node\dist\src\worker-bundle.js:2:49840 at Generator.throw () at a (C:\Program Files (x86)\SiteExtensions\Functions\4.27.5\workers\node\dist\src\worker-bundle.js:2:48254) at process.processTicksAndRejections (node:internal/process/taskqueues:95:5) at Microsoft.Azure.WebJobs.Script.Description.WorkerFunctionInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in //src/WebJobs.Script/Description/Workers/WorkerFunctionInvoker.cs:line 101 at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters) in //src/WebJobs.Script/Description/FunctionInvokerBase.cs:line 82 at Microsoft.Azure.WebJobs.Script.Description.FunctionGenerator.Coerce[T](Task`1 src) in //src/WebJobs.Script/Description/FunctionGenerator.cs:line 225 at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`2.InvokeAsync(Object instance, Object[] arguments) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.cs:line 52 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeWithTimeoutAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 581 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 527 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 306 --- End of inner exception stack trace --- at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 352 at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.TryExecuteAsync(IFunctionInstance functionInstance, CancellationToken cancellationToken) in D:\a_work\1\s\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 108

apis
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

·
Infer Wang avatar image
Infer Wang answered

I see there are spikes WritePlayerEvent APIClientRequestRateLimitExceeded and GetUserReadOnlyData APIClientRequestRateLimitExceeded in your title. Do you know whether these two APIs return the error: "code":503,"status":"Service Unavailable","error":"Connection error","errorCode":2,"errorMessage":"connect ETIMEDOUT 20.120.128.232:443"?

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.