question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

GetTitleData frequently, but not always, errors with "The response ended prematurely"

My exact code looks like this:

var playFabResult = await PlayFabServerAPI.GetTitleDataAsync(new PlayFab.ServerModels.GetTitleDataRequest()
{
    Keys = new List<string>()
    {
        "login_queue_players_per_second",
        "max_players_per_lobby",
        "server_v2_regions",
        "legiontd2_aelobby",
        "legiontd2_aelobby_test",
        "enable_azure_functions",
    }
});

if (playFabResult.Error != null)
{
    DeveloperApi.LogWarning("Failed to get title data");
    DeveloperApi.LogWarning(JsonConvert.SerializeObject(playFabResult.Error));
    return;
}

Probably 80% of the time, the call succeeds and everything is fine. But about 20% of the time, it reaches the error case and prints this error:

{"HttpCode":0,"HttpStatus":null,"Error":2,"ErrorMessage":"The
 response ended 
prematurely.","ErrorDetails":null,"RequestId":null,"RetryAfterSeconds":null}

I know that API calls intermittently fail, which is why I have some retry logic, but it's extremely suspicious to me that it fails about 20% of the time. It's been like this for months.

sdks
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.

Rick Chen avatar image Rick Chen ♦ commented ·

The cause of the issue can be that the server closed the connection without having sent back a complete response. Could you please provide your title id for us to troubleshoot?

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) Rick Chen ♦ commented ·

Title Data is 9092. Are there any next steps I should try? The issue reproduces both locally and on Azure.

0 Likes 0 ·

1 Answer

·
Rick Chen avatar image
Rick Chen answered

There was an incident causing High InternalServerErrorRate for GetTitleData API in the past, it has now been resolved. Sorry for the inconvenience. If the issue still exists, please don’t hesitate to let us know.

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.

Daniel Gofman avatar image Daniel Gofman commented ·

Today around 12:00 pm UTC we had this issue with fetching title data again (same title id as above):

(UTC:12:07:01.444): {"HttpCode":0,"HttpStatus":null,"Error":2,"ErrorMessage":"The response ended prematurely.","ErrorDetails":null,"RequestId":null,"RetryAfterSeconds":null}

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.