Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When/how are sessions cleaned up? #4463

Open
rthouvenin opened this issue Jan 15, 2025 · 0 comments
Open

When/how are sessions cleaned up? #4463

rthouvenin opened this issue Jan 15, 2025 · 0 comments

Comments

@rthouvenin
Copy link

MongooseIM version: 6.2.1
Installed from: Docker

I have deployed an instance of MIM and an external service that uses the HTTP admin API to query the list of sessions and find out which users are currently online, and I noticed that the API reports sessions that are not in use since a long time.

It seems that when the client disconnect abruptly, the session remains on the server until it's restarted (I presume this is because sessions are stored in mnesia, and they would remain forever if I was using redis ?). I am using JWT auth with a TTL of 1 hour, and the sessions remain after the expiry of the JWT.

  • Is this the expected behaviour? I would expect that the session be destroyed when the server realises the connection is broken, for example when trying to deliver a received message (N.B.: I didn't enable mod_ping).
  • Can I change this behaviour by configuration, and give a timeout to stale sessions?
  • Is there a better way to find out if a user is online from the admin API?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant