Room gets stuck after a login attempt

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

Moderators: Lapo, Bax

liora1443@gmail.com
Posts: 1
Joined: 24 Aug 2016, 17:21

Room gets stuck after a login attempt

Postby liora1443@gmail.com » 24 Aug 2016, 17:37

Hi,

I have an issue regarding a SFS server i'm writing.

The client-side for the server is a unity android application.

A single room in my game can contain a maximum of 6 slots(A user which attempts to a "Full" room is redirected to a new room which i open).

When the last slot is filled by a user the room gets stuck for all of the users in the room.
In this situation i see that the session was removed in the server logs.

The client logs for all of the users are usually updated by incoming SFS events but are NOT updated beyond the point in which the room gets stuck.

Would love any assistance you may provide :)
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Room gets stuck after a login attempt

Postby Lapo » 25 Aug 2016, 06:31

Hello
liora1443@gmail.com wrote:When the last slot is filled by a user the room gets stuck for all of the users in the room.
In this situation i see that the session was removed in the server logs.

What do you mean by "gets stuck"?
Also what session is removed? That of the last user that joined?

Is this something that can be reproduced? If so please describe the sequence of requests that leads to the issue.

Finally, please, always specify what version of SFS2X are you using and what version of the client API.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Room gets stuck after a login attempt

Postby Lapo » 25 Aug 2016, 06:32

Lapo wrote:Hello
liora1443@gmail.com wrote:When the last slot is filled by a user the room gets stuck for all of the users in the room.
In this situation i see that the session was removed in the server logs.

What do you mean exactly by "gets stuck"?
Also what session is removed? That of the last user that joined?

Is this something that can be reproduced? If so please describe the sequence of requests that leads to the issue.

Finally, please, always specify what version of SFS2X are you using and what version of the client API.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
lior
Posts: 7
Joined: 20 Jul 2016, 12:16

Re: Room gets stuck after a login attempt

Postby lior » 25 Aug 2016, 08:34

hi
Last edited by lior on 25 Aug 2016, 09:46, edited 1 time in total.
lior
Posts: 7
Joined: 20 Jul 2016, 12:16

Re: Room gets stuck after a login attempt

Postby lior » 25 Aug 2016, 09:45

Lapo wrote:
Lapo wrote:Hello
liora1443@gmail.com wrote:When the last slot is filled by a user the room gets stuck for all of the users in the room.
In this situation i see that the session was removed in the server logs.

What do you mean exactly by "gets stuck"?
Also what session is removed? That of the last user that joined?

Is this something that can be reproduced? If so please describe the sequence of requests that leads to the issue.

Finally, please, always specify what version of SFS2X are you using and what version of the client API.

Thanks


Hi,
this is the log :

24 Aug 2016 | 15:57:50,420 | INFO | SocketReader | bitswarm.sessions.DefaultSessionManager | | Session created: { Id: 159, Type: DEFAULT, Logged: No, IP: 31.154.9.254:50027 } on Server port: 9933 <---> 50027
24 Aug 2016 | 15:57:50,616 | INFO | SFSWorker:Sys:3 | v2.api.SFSApi | | User login: { Zone: PokerExtension }, ( User Name: e9a72885-8253-4da8-b95c-6d781d4ff21c, Id: 155, Priv: 0, Sess: 31.154.9.254:50027 ) , Type: Unity
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | Extensions | | {PokerExtension}: rooms Size : 1
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | Extensions | | {PokerExtension}: room : [ Room: room120, Id: 123, Group: default, isGame: false ] , playerCount : 5 , userCount : 2
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | Extensions | | {PokerExtension}: rooms Size :1
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | Extensions | | {PokerExtension}: chooseRoom
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | Extensions | | {PokerExtension}: ( User Name: e9a72885-8253-4da8-b95c-6d781d4ff21c, Id: 155, Priv: 0, Sess: 31.154.9.254:50027 ) chooseRoom !!!!
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | Extensions | | {PokerExtension}: room : [ Room: room120, Id: 123, Group: default, isGame: false ] , playerCount : 5
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | Extensions | | {PokerExtension}: Return room : [ Room: room120, Id: 123, Group: default, isGame: false ]
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | Extensions | | {PokerExtension}: room : [ ROOM: ROOM120, ID: 123, GROUP: DEFAULT, ISGAME: FALSE ]
24 Aug 2016 | 15:57:50,852 | INFO | New I/O worker #7 | v2.api.SFSApi | | Room joined: [ Room: room120, Id: 123, Group: default, isGame: false ], { Zone: PokerExtension }, ( User Name: e9a72885-8253-4da8-b95c-6d781d4ff21c, Id: 155, Priv: 0, Sess: 31.154.9.254:50027 ) , asSpect: false
24 Aug 2016 | 15:57:50,853 | INFO | SFSWorker:Ext:1 | Extensions | | {PokerExtension}: USER_JOIN_ROOM
24 Aug 2016 | 15:59:37,886 | INFO | SocketReader | bitswarm.sessions.DefaultSessionManager | | Session removed: { Id: 159, Type: DEFAULT, Logged: Yes, IP: 31.154.9.254:50027 }
24 Aug 2016 | 15:59:37,886 | INFO | SFSWorker:Sys:3 | v2.api.SFSApi | | User disconnected: { Zone: PokerExtension }, ( User Name: e9a72885-8253-4da8-b95c-6d781d4ff21c, Id: 155, Priv: 0, Sess: 31.154.9.254:50027 ) , SessionLen: 107270, Type: Unity
24 Aug 2016 | 15:59:37,886 | INFO | SFSWorker:Ext:3 | Extensions | | {PokerExtension}: USER_DISCONNECT


The last player enters the game, causing the game to get stuck and stop.
The room get stuck for all the players in the room .

Something happens and I dont know why.
I can reproduced this.
Is deleting Session of one players can cause a problem for those who are in the room?

The version of the SFS : { SmartFoxServer 2X -- 2.9 } - Version 2.9.0
client Version: 1.6.5
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Room gets stuck after a login attempt

Postby Bax » 25 Aug 2016, 15:26

A "room getting stuck" is not something related to SFS, but your client application.
So I suppose the user leaving the room due to disconnection is something your game is not supporting, resulting in what you think is a stuck game. For example if the user leaves during his turn and you don't handle this situation, then all the other users may be waiting for him to play, which will never happen.

The reason why the user is disconnected must be further explored. In the logs, the last entry before the disconnection is that "USER_JOIN_ROOM" your extension prints at 15:57:50. Then the disconnection occurs at 15:59:37, nearly 2 minutes after. Are you sure the user is "doing something"? Maybe he is idle, and the server kick him according to the relevant Zone setting...
Paolo Bax
The SmartFoxServer Team
lior
Posts: 7
Joined: 20 Jul 2016, 12:16

Re: Room gets stuck after a login attempt

Postby lior » 26 Aug 2016, 23:59

Bax wrote:A "room getting stuck" is not something related to SFS, but your client application.
So I suppose the user leaving the room due to disconnection is something your game is not supporting, resulting in what you think is a stuck game. For example if the user leaves during his turn and you don't handle this situation, then all the other users may be waiting for him to play, which will never happen.

The reason why the user is disconnected must be further explored. In the logs, the last entry before the disconnection is that "USER_JOIN_ROOM" your extension prints at 15:57:50. Then the disconnection occurs at 15:59:37, nearly 2 minutes after. Are you sure the user is "doing something"? Maybe he is idle, and the server kick him according to the relevant Zone setting...



I support this mode,
This problem doesn't happen always, It happens in specific situations and I have a feeling that a specific smartphone causing the problem.

It makes sense ?
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Room gets stuck after a login attempt

Postby Bax » 27 Aug 2016, 06:46

It is very difficult to say, because from our point of view, there's no differences between devices.
You should further investigate the issue, tracing API debug messages and your application debug messages.
Let us know if you find anything.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 51 guests