question

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

Authentication seemingly stopped working

For title ID 9092, it seems like authentication stopped working or might be throttled.

In my logs, I have a lot of


[Log ]     0 136.630: Attempting to authenticate via PlayFab...

after which I have my authentication code:

static async Task<AuthenticateSessionTicketResult> AuthenticateSessionTicket(string playFabId, string sessionTicket, Action<PlayFabError> onError)
{
var task = await PlayFabServerAPI.AuthenticateSessionTicketAsync(new AuthenticateSessionTicketRequest()
{
	SessionTicket = sessionTicket
});

if (task.Error != null)
{
	LobbyApi.LogPlayFabError(task.Error, playFabId);
	if (onError != null)
		onError(task.Error);
}

	return task.Result;
}

This code previously worked fine, but now with maybe 1,500 concurrent people trying to log in, it seems to never return a result.

Authentication
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

Actually, the RedeemMatchmakerTicket calls are passing just fine. The graph on the main page of your title dashboard is a fairly accurate view of the calls we're receiving and the number of any errors being returned. There was a pretty massive spike in concurrent edit errors on UpdateUserTitleDisplayName, which would imply that there were a large number of calls to that API method for a single player - that could be due to someone with a hacked client or a corner case in your code. I'm also seeing some cases where clients are attempting to call GetCurrentGames and GetLeaderboardAroundPlayer (there was another spike of that just now, while I was writing this).

Can you explain in more detail what the call pattern is though? I'm seeing a surprisingly high number of calls to both redeem matchmaker tickets and update statistics, relative to the number of players. Also, I notice that you're using both RedeemMatchmakerTicket and AuthenticateSessionTicket. Why is that, exactly? The latter call is really only intended for cases where you're using your own matchmaker, since the matchmaker ticket already gets you verification of the user.

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

brendan avatar image brendan commented ·

Wait - I see the problem. You have the min free slots/max instances set to 1 and 1 for two of the server builds, and 2 and 5 for the third. Bear in mind that a server can take around 10 minutes to be ready, from when it is requested (the steps on our side are - request the server from EC2, image the server with the AMI, copy your server build from S3, decompress your server build into the right folders, run your game server executable). The purpose of the min free slots setting is to make sure we're always running enough servers for you, so that players will be able to find sessions.

Basically, when you activate a region right now, only one server starts. As soon as a game instance is started on it (from a Matchmake or StartGame call), that starts the process of getting another server set up, since only at that point is there no longer an available instance waiting to start. So after 10 minutes or so, it's ready, and the next Matchmake or StartGame call that needs a new server takes it.

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) brendan commented ·

Thanks for the continued investigation. The lobby server is meant to be a single instance that can handle all the players, then it passes them off to game servers (which have min free slots 2, max slots 5)

Earlier, I tried having multiple lobby server instances running on a machine, but that ran into a lot of problems since my code assumed it was a single instance.

0 Likes 0 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Thanks for the update - I'll try disabling the RedeemMatchmakerTicket code and see what it looks like. I think the UpdateUserTitleDisplayName was due to a bug that should hopefully be fixed now.

0 Likes 0 ·
brendan avatar image brendan Brent Batas (Lisk) commented ·

? Aren't you using our Matchmaker? If so, RedeemMatchmakerTicket is the one to keep, rather than the other way around. It looks like you have a "city" and "dungeon" server setup, am I correct? So the thing to do would be to use RedeemMatchmakerTicket on the "city" server, and once players form teams that you want to then send to a "dungeon" server, you use StartGame from the "city" and give the lobby info to the players so that they can matchmake into it. But you need to have the min slots set to the max number of instances you might need to start in a 10 minute period.

1 Like 1 ·
Brent Batas (Lisk) avatar image Brent Batas (Lisk) brendan commented ·

That's correct. I thought I needed AuthenticateSessionTicket to verify that it was a legitimate Steam login from the client. I also looked at my RedeemMatchmakerTicket code and it looked like I didn't even do anything with the result. That's why I thought I could remove RedeemMatchmakerTicket.

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.