question

Dan Mlodecki avatar image
Dan Mlodecki asked

Intermittent 500 Error on Azure Functions called via Playfab

I am experiencing an intermittent 500 Error with an Azure Function I am calling through PlayFab.

The function grabs JSON from a Cosmos DB instance and returns it to the Unity/PlayFab SDK client as JSON. A sample JSON file is attached. The size is 10.3 kb.

This function, dbGetAllTerrain, generates errors but my other function, dbUpdateTerrain, does not.

Overnight tonight I experienced two periods where the dbGetAllTerrain function returned the 500 Error. The first event ended after perhaps 90 minutes and started returning data again. At no point during these events were any changes made to the Azure Functions, i.e. the same code was in place in Azure.

Additionally, when this 500 Error occurs, the function call does not generate a PlayStream Event even though one has been requested.

I considered the possibility that there is a limit in place to block requests with a return size over a certain value due to the "result.FunctionResultTooLarge" sample code. That code is not being triggered, however.

When the function returns the 500 Error, the underlying Azure Function is still online. I can paste the URL into a browser window and the JSON appears as expected.

My title's ID is F4AB3. Any suggestions or verification you can offer would be greatly appreciated.

Sample JSON data:

function1json.txt (renamed to .txt to get around forum upload filter)

CloudScript
function1json.txt (10.4 KiB)
2 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.

Dan Mlodecki avatar image Dan Mlodecki commented ·

I tried reducing the size of the data returned to 9.75kb but as of this moment the 500 Error remains.

0 Likes 0 ·
Dan Mlodecki avatar image Dan Mlodecki Dan Mlodecki commented ·

Further investigation reveals that this bug is related to my other bug from this morning.

If I simply modify my Unity/PlayFab code to no longer request a PlayStream Event:

GeneratePlayStreamEvent = false

The function call succeeds. Changing it back to 'true' causes the 500 Error.

0 Likes 0 ·

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

Thanks for reporting this PlayStream Event generating issue, we have reproduced it and informed our corresponding team to investigate it.

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.

franklinchen avatar image franklinchen commented ·

The fix has been deployed now, thank you for reporting.

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.