etherpad-lite icon indicating copy to clipboard operation
etherpad-lite copied to clipboard

Automatically reset session timeout

Open disy-mk opened this issue 13 years ago • 6 comments

One can create several sessions in a row;

But as it maps author/group it would be better to

  • update an already existing session or
  • delete the old and create a new one

Or did I miss some conceptual details?

disy-mk avatar Feb 15 '13 10:02 disy-mk

You mean it's not ideal that you're able to create more than one valid session between an author and a group?

marcelklehr avatar Feb 15 '13 12:02 marcelklehr

I mean, if I create one which is valid for 10 minutes, and another, which will be valid for only 5 minutes, how long will my session be valid then.

I am creating an owncloud app for EPL. Whenever a user is inside the epl app the session should be "refreshed". Instead of manually look for an active session, deleting it and creating a new one, or even worse, creating everytime a new session polluting the db does not sound like the best approach...

disy-mk avatar Feb 15 '13 12:02 disy-mk

I mean, if I create one which is valid for 10 minutes, and another, which will be valid for only 5 minutes, how long will my session be valid then. You need to set the session id on a cookie. How long the client has access, depends on how long the session you gave them is valid. If you gave them both, they'll have access as long as one of the sessions is still valid for the current request.

I don't know whether sessions are refreshed, but imo the timeout should be reset on every request...

marcelklehr avatar Feb 15 '13 13:02 marcelklehr

OK, I did some testing;

The scenario: as soon as the user visits the pad panel in my app I want a valid session for him 2be created. So I do resulting in having a valid session, let's say valid for 1 hour.

But as I want to "refresh" that session I create a session whenever he visits this panel again, to set the cookie validity to 1 hour again. This, however, results in a new session-key in the db. Also for every session key the sessionID gets appended to the "group2sessions"-key value as well as to the "author2sessions"-key value. This really pollutes the DB. For 5k users actively using that app und the pads the result would be insane!

For now I'm reducing that effect by setting validity to 3 hrs and only recreate a session, if the old one is older than 10% of that 3 hrs.

Thus, adding a session for a author/group, old sessions should be removed from db.

disy-mk avatar Mar 06 '13 09:03 disy-mk

Any comment on that? Issue has the label "Waiting on Testing"; this is what I did :-)

disy-mk avatar Mar 19 '13 01:03 disy-mk

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 04 '20 23:06 stale[bot]