question

Dimeland avatar image
Dimeland asked

Scheduled tasks on player segment - what happens after a timeout?

I had a scheduled task to run on a player segment with 2 players this night. The task ran succesfuly for both players, according to the game manager, but on Azure portal I can see that only one function was called. Also, the first function timed out on Playfab. Is the timeout related to the second player not getting the task ran on him?

scheduled tasks
10 |1200

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

Dimeland avatar image
Dimeland answered

So for posteriority the issue was a cold start of the azure server running my function. This issue is reproducible if you call a function that is not called for a long time. A quick and free solution is to create a dummy task 5 mins earlier or so calling the same function to wake up the server. I just called the function with null arg and the problem is solved. Thank you for the help, Gosen Gao.

10 |1200

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

Gosen Gao avatar image
Gosen Gao answered

--The task ran succesfuly for both players, according to the game manager, but on Azure portal I can see that only one function was called

We recommend to check if the function is executed for players correctly by checking the Log stream, please refer to Debugging CloudScript using Azure Functions in the Azure portal - PlayFab | Microsoft Learn.

--Also, the first function timed out on Playfab. Is the timeout related to the second player not getting the task ran on him?

The timeout should not relate to other requests, it indicates that PlayFab is not getting response for the current request within a specific period.

11 comments
10 |1200

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

Dimeland avatar image Dimeland commented ·

Thanks for the response. I am aware of Azure's Log Stream, but there is not anything to debug if the code is never called :) I checked in Azure's function monitor and only one function was called.

The timeout should not relate to other requests, it indicates that PlayFab is not getting response for the current request within a specific period.

Hum... if it is not related then something happened in the scheduled task... This situation happened to me more than once. Can someone take a look, please?

Title ID: 75F38 This scheduled task happened on December 7, 2022 12:01 AM

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao Dimeland commented ·

Can you share us the execution events of both players?

0 Likes 0 ·
Dimeland avatar image Dimeland Gosen Gao commented ·

Sure! Where can I find those? The scheduled task runs an azure function to delete the user's account, so both accounts no longer exist.

0 Likes 0 ·
Show more comments

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.