Page 1 of 1

LogoutRequest problem

Posted: 01 Apr 2024, 17:47
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

Re: LogoutRequest problem

Posted: 02 Apr 2024, 14:19
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

Re: LogoutRequest problem

Posted: 14 Apr 2024, 09:43
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?

Re: LogoutRequest problem

Posted: 15 Apr 2024, 07:22
by Lapo
Thanks,
what client API are you using (platforms/version)?

Thanks

Re: LogoutRequest problem

Posted: 15 Apr 2024, 08:20
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