question

brendan avatar image
brendan asked

Slow response times

Question from a developer:

We're seeing slow responses to queries (sometimes taking up to 10 seconds) to PlayFab. What can cause this?

unity3dCustom Game ServersPlayer Inventory
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, if you're seeing slow responses, it's best to get a Wireshark capture (https://wiki.wireshark.org/SSL, so that you can see the contents of the packets), in order to determine what the truth is of where the delay occurs. If that shows an actual delay, we'll need that capture for our investigation here.

However, there are a couple of things you can check first, which may solve the problem much more quickly:

1. The average time for a response from our service - for all calls to each API in a given hour - is in your API Usage Details report in the Game Manager (Analytics->Reports). You may want to check that first, to see what our backend numbers show.

2. If you're using Unity, please be aware that our SDK is set up for you to use Unity Web Requests by default, for broad compatibility. However, if you're running multiple instances of the same exe on one machine, that will cause a slow-down to Unity Web Requests which could explain what you're seeing. Try switching to HTTP Web Requests, if you need to have multiple executables running.

3. Inventory operations where you're adding a lot of items at once (and don't forget to count each item in any bundle being added as well, since they're all added at the same time), and particularly if you're adding a lot of items to an already large inventory, will take longer, as the inventory operation will be rate throttled in PlayFab, to prevent any database issues (which would cause the inventory operation to fail). To be clear, it shouldn't take 10 seconds (unless you're adding hundreds of items), but it will take significantly longer than adding a few items.

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.