question

DawidC avatar image
DawidC asked

Server Backfill - Continuous ticket creation

Hi,

I've implemented backfill logic for my server. It looks like this:

1) Create one backfill ticket.

2) Every 6 seconds, check if ticket was matched or canceled.

3) Clear ticket id and go to point 1.

The game starts with 1vs1 setup and tries to backfill up to 4vs4, or just compensate for players that left the game.

In general, this logic works fine. Unfortunatelly, after few matched/canceled tickets I get this error: "User is a member of too many backfill tickets.", and players are not able to match to the game anymore.

Closest subject I found was this: https://community.playfab.com/questions/45155/server-backfill-how-it-works-how-to-get-player-ent.html

Do I have to remove "consumed" tickets or reuse them? What is the correct flow in such a case?

Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Gosen Gao avatar image
Gosen Gao answered

After doing some research, I found that the error code corresponding to this error message is MatchmakingTicketMembershipLimitExceeded. This error will occur if you try to create another ticket when this player already has an active ticket(WaitingForMatch) in this queue. To prevent such issue, please cancel the active ticket before creating another one. You can use API CancelAllServerBackfillTicketsForPlayer and CancelServerBackfillTicket to cancel the active ticket.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

DawidC avatar image
DawidC answered

How is this possible? I create a new ticket when the previous one is Canceled or Matched. I never create new if it's WaitingForMatch. Should I cancel Matched tickets?

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.

Gosen Gao avatar image Gosen Gao commented ·

You can use API ListServerBackfillTicketsForPlayer to check if a player has any active tickets. When this error occurs, you can call API CancelAllServerBackfillTicketsForPlayer to cancel all tickets for this player.

0 Likes 0 ·
DawidC avatar image DawidC Gosen Gao commented ·

I will try this. Netherway, it sounds like a walkaround. I wanted to avoid error, not wait for it and react.

0 Likes 0 ·
DawidC avatar image
DawidC answered

Looks like it works better. For now I will keep this solution and observe. Thanks.

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.