Issue with users getting "stuck" and becoming unkickable

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

Issue with users getting "stuck" and becoming unkickable

Postby andrew2110 » 11 May 2017, 15:50

Probably around once a day at the moment a user will become "stuck" (what they actually see on their side is a mystery, I suspect they just minimize the app and forget about it for a bit or something?). When they become stuck we're not able to modify any variables of theirs on server side, neither are we able to kick them, ban them and they're not effected by the idle kick timer. The only way to restore order is to reset the server. Is there any way around this?


Here's the youtube of me trying everything I can think of to remove this user:

https://youtu.be/xsnZcd9LbnY
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Issue with users getting "stuck" and becoming unkickable

Postby Lapo » 11 May 2017, 16:31

Hi,
from the admin tool it looks like the client last request was sent 14 minutes earlier, not a huge amount of time. I'd expect it to be kicked out sooner or later.

As you can see when you repeatedly kick/ban the user more messages are accumulated in the client's queue, which in turn means the server is not able to communicate with the client. (It's likely he has the app in background or frozen).

I would just recommend to be patient and see what happens after several hours. The connection should drop, once the TCP timeout is triggered (which is out of your and our control).

If not drop us an email to our support@... email and we'll try to give it a closer look.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

Re: Issue with users getting "stuck" and becoming unkickable

Postby andrew2110 » 11 May 2017, 17:10

The problem being is with the game works, these users enter into a race and are put into a seperate race room,

The race starts when all users set their "accepted" variable to true, the server has code so that when 50% of the users waiting for the race have accepted, it will start the race for everyone. However because the server can't edit this users variables, they effectively break the race for everyone else and everyone in that race just sits there until they get bored and quit which leads to me having to come on and reset the whole server. The servers set to kick people off after 2 minutes of idle (the games client pokes the server every 30 seconds to keep in sync so if they've not sent a message for 2 minutes somethings gone wrong!)
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Issue with users getting "stuck" and becoming unkickable

Postby Lapo » 12 May 2017, 07:21

You could use a different strategy, by removing an idle client from the game Room so that another player can join and the game can start.
You can still maintain the 2 minutes kick, but add a 1 minute (or so) timeout if the user has not yet accepted to start.

Maybe you could also signal it on the client side via a visible timer counting down.
Lapo

--

gotoAndPlay()

...addicted to flash games
andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

Re: Issue with users getting "stuck" and becoming unkickable

Postby andrew2110 » 12 May 2017, 07:30

There is a visible countdown to race as well. There is both code on the client and the server to force the users to start the race after a set time. The problem is that there is literally no control over that user when they are in that state, the server can't kick them, the clients code isn't doing anything, we can't change their variables on the server / client, their state is just 100% frozen, we can't even delete the room that the frozen client is in, the only solution is a complete reset of the server.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Issue with users getting "stuck" and becoming unkickable

Postby Lapo » 12 May 2017, 09:54

That's why I suggest to remove the idle User from the Room.
It doesn't matter if the client is frozen, the server will anyway remove the client from the Room, thus leaving an empty slot for somebody else. Only the frozen client will not receive an update, but that's a different issue.

Kicking, on the other hand, requires the disconnection process to complete, but if the connection is stuck it won't happen (at least not immediately), thus not triggering all the necessary operations such as removing the user from the system.

There's no need to restart the server.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
andrew2110
Posts: 90
Joined: 28 May 2008, 13:36

Re: Issue with users getting "stuck" and becoming unkickable

Postby andrew2110 » 12 May 2017, 11:40

Ah sorry I misunderstood, the code I've added now will be:

- When 50% of users in the race have "accepted" and ready to start a race, the server will start a 3 second timer.
- Any users who have still not accepted (acceptance should be forced on them from above ^) they'll be removed from the race room by the server.

Thanks for your help!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 53 guests