question

Daisuke avatar image
Daisuke asked

cloudScript json limits

Hi, Daisuke is writting from Japan. :-)

I'm Azure engineer, but pre-intermediate level for PlayFab.

My friend is facing an issue around CloudScript.

Can you please give some advice on it?

<<<Question>>>

Now, he have player stats data which is initialized using the JSON data to upload to playfab as player (title) data. We have implemented a functionappp as cloud script, but the code got an error with large JSON data.

Actualy, An error occurred when updating the following data with CloudScript and more than 10 elements in Json.

When we sprit the JSON data to two smaller Jsons, the data can be updated without any problem.

If there are 10 or more elements of JSON data, may an error occur due to the PlayFab structure?

I think it is related to another limitation of [The max Key size is 100. The max Value size is 300,000.],

but I don't sure. Are there any other limits on user data (Title) ?

Also I checked this post. https://community.playfab.com/questions/45326/userdata-limits.html

Daisuke

CloudScript
10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

>> If there are 10 or more elements of JSON data, may an error occur due to the PlayFab structure?

Yes, if you try to update more than 10 Player Data K/V pairs in one request. It would exceed the PlayFab limits. You can navigate to the [Game Manager]->[Title settings]->[Limits] or https://developer.playfab.com/en-US/[YourTitleID]/limits to check your title’s limits.

>> Are there any other limits on user data (Title)?

Yes, there are other limits on Player Data(Title). Within 15 seconds, the maximum number of update operations for the same Player Data value is 10 times. Per 5 minutes, this limit is 150 update operations. Per hours, the same Player Data can be updated 1800 times maximumly. As the first answer said, you can navigate to the title’s [Limits] page for more info.

In order not to exceed the limit, the possible solution is to merge multiple JSON items into one JSON string, then update this JSON string as one Player Data K/V pair’s value. If so, you can decrease the K/V pair’s amount you update in one request. Or you can consider using Entity Objects to store the data.

10 |1200

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

Daisuke Masubuchi avatar image
Daisuke Masubuchi answered

Sorry, there is similar discuss. https://community.playfab.com/questions/45326/userdata-limits.html
There are two alternative, 1 Splitting JSON data, and 2. Moving to Entity Model from the Classic, aren't there? We will consider the Entity Model for work around so far.

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.