LogoutRequest problem

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

Moderators: Lapo, Bax

Post Reply
User avatar
mete2221
Posts: 82
Joined: 30 Aug 2017, 17:01

LogoutRequest problem

Post by mete2221 »

After too many LogoutRequests "[SFSWorker:Ext:3] api.SFSApi - Login failed: username, session is already expired!" starts to happen.

You can set up a LoginRequest -> LogoutRequest loop to replicate.

SmartFox Server 2.19.0 Windows/Linux
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: LogoutRequest problem

Post by Lapo »

Hi,
I am not sure what you mean by "too manu logout requests".
The error reported is triggered by a Login request that arrives at the server when the session is no longer open.

Keep in mind that default Session idle time is only 20 seconds, so if your use case requires longer pauses between Logout and the next Login you will need to change that value. (AdminTool > Server Settings)

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
mete2221
Posts: 82
Joined: 30 Aug 2017, 17:01

Re: LogoutRequest problem

Post by mete2221 »

Lapo wrote:Hi,
I am not sure what you mean by "too manu logout requests".
The error reported is triggered by a Login request that arrives at the server when the session is no longer open.

Keep in mind that default Session idle time is only 20 seconds, so if your use case requires longer pauses between Logout and the next Login you will need to change that value. (AdminTool > Server Settings)

Cheers


I am talking about a user's logout and login cycle in a single session, after a certain period of time, when I log in after logout, it gives the error "[SFSWorker:Ext:3] api.SFSApi - Login failed: username, session is already expired!".

So for example, the user logs in and then logs out in a single session and does this 10 times, but when he logs in after logging out on the 11th time, the above error occurs.

After each logout, it logs in again within 1-2 seconds. (So the timeout period is not exceeded)

I wonder if the session idle time is not reset after logout?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: LogoutRequest problem

Post by Lapo »

Thanks,
what client API are you using (platforms/version)?

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

Re: LogoutRequest problem

Post by Lapo »

Update:
I've run an automated test where the client runs this loop:

1- connect
2- log in
3- wait 5 secs
4- log out
5- wait 5 secs
6- goto 2

This is done 50 times and there are no server side errors.
(SFS2X 2.19.3)

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply