Hi there. I'm currently working on Server Build and experiencing weird behavior.
ServiceUnavailable, Timeout, 400 BadRequest Exceptions are gitting thrown from time to time even though I have a stable internet connection and accepted certificates.
My question is, does playfab have hidden limitations? For example, Server Build may add Virtual currency to 6 players at the same time is that an issue?
What else may cause these exceptions?
Here is the console log. https://pastebin.com/FwPvrXgi
Answer by Citrus Yan · Sep 09, 2019 at 08:41 AM
Hi,
You are saying PlayFab randomly throws ServiceUnavailable / Timeout errors, do you mean that in most cases you servers work fine? I have seen the logs you posted, it seems that the issue may relate to AddUserVirtualCurrency API request you mentioned. General speaking, a 400 error will always contain an error, errorMessage, and errorDetails that will help to solve the question of why the error occurred. It would be helpful if you can gather these logs for us to investigate.
Here is the sample:
{ "code": 400, "status": "BadRequest", "error": "InvalidParams", "errorCode": 1000, "errorMessage": "Invalid input parameters", "errorDetails": { "CustomId": [ "The CustomId field is required." ] } }
PlayFab do have a limit on server APIs that are limited to 1000 calls per 10 seconds, although I don’t think it will cause this issue if you are only making 6 API calls at the same time.
About what else may cause these exceptions, I found this thread which says that server API calls are not allowed due to certificate issues in Unity, you might want to check it out.
Hi, thanks for the reply. The thing is that the error does not have any Error Details at all.
The log that I've linked is using overriden ToString() method that appends Error Details at the end if there are any.
Have you checked the thread about certificate issues in Unity I posted? And, could you please provide your title id for us to investigate? Thanks.
Hi, its F8C7.
Also, I have increased timeout settings from 2000 ms to 4000 ms and the problem seems to be fixed. Anyway, I'm not sure cause the exception was occurring infrequently.