question

jonas.barnaby@gmail.com avatar image
jonas.barnaby@gmail.com asked

Some questions about UpdateUserData

Hi guys,

I'm testing some functionalities in our game and I've got some questions about the API, specifically about the UpdateUserData call.

- I've checked there's a limit to the value size in a key-value pair and the behavior seems to trim the string and persist the characters before the trimming without returning any error. Is this correct?

- As for the key size I've come across an odd result. I've set on purpose an extremely long string (around 14k characters) for the key and made the call, which doesn't return any error but it doesn't persist the data either. This is a screenshot of the variables I use: http://i.imgur.com/QNy7jdF.jpg

- Tryng to persist more than 100 key-value pairs returns a 1000 error. Is this working as intended or should I receive a 1146? How can I trigger the 1145 and 1146 error codes?

 

Thanks in advance!

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

·
brendan avatar image
brendan answered

First, it's worth noting that our limits are designed to make sure our service remains efficient and affordable, but many of them can be increased for titles that have a definite need. If you do, please let us know the specifics via email to devrel@playfab.com, and we'll work with you on the details of that increase.

Thanks for calling that out - the UpdateUserData call should indeed be returning the key length and data length exceeded errors - I'll get a bug filed for that. Currently, the max Key length is 1 KB, while the max Value length is 100 KB. Note though that this doesn't mean you'd be able to write 100 Keys with 100 KB worth of Value each - or read them - in rapid succession. Titles need to be efficient in their data usage, in order to ensure that they are staying within reasonable usage levels. The simple way to approach this is, if you're reading or writing more than about 10 KB per minute (averaged over the player session), or if you're attempting to read or write 100 Keys or 100 KB of data in a single shot, for instance, there should be optimizations that can be made to reduce this. Note that this does not include Content, which is our CDN service, or any communication between custom game servers and clients or third-party services (which have their own usage policies) and clients. If you're having trouble optimizing your data calls, please do let us know and we can help to advise you - we'll have a best practices doc available soon, as part of this.

For the last part, as stated on our Limits page (https://playfab.com/limits/), titles are limited to 100 keys by default. I'll also get a bug filed for a clear error message around that, for titles attempting to exceed their defined limits.

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.