-
Notifications
You must be signed in to change notification settings - Fork 690
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
Logged out mid-upload due to inactivity? #6763
Comments
That is the behaviour for JI sessions (which are server-side and Redis-backed) but not for SI sessions (which are client-side). SI sessions have a timeout value that is set once, when the user logs in, to now+120min (see original implementation discussion here: #880). This is kindof a problem anyway, as https://metrics.torproject.org/torperf.html?start=2022-12-03&end=2023-03-03&server=onion&filesize=5mb indicates that we should be expecting on the order of 2-3min for a 5MB upload (assuming uploads and downloads to an onion service are roughly equivalent), which naively gives us about 3-5hrs or so for a 500MB one 😬. It's entirely possible that a source uploading multiple big submissions in one session would hit the limit, even if they were avoiding maxing out individual submission sizes. So, maybe at minimum we should be:
A bigger change, requiring some security modeling, would be:
|
Probably simplest way would be to just reset the expiry time at the beginning of submissions, not sure if it's worth capping the number of times you could do that a la JI |
I timed upload times on a couple of different circuits yesterday and with files 1-50MB just to get some anecdata. My best speed was 2.2 Mbit/s, but average was more like 0.4-0.6 Mbit/s. I also encountered one very slow relay, where I encountered multiple timeouts while trying to access the source interface. Switching circuits resolved this. Very unscientific results (each file size tried over 2 different circuits) for uploads: Downloads (from client): 50MB : 1st try sync failure after 2min, can't reach server; restarted Tor, 2nd try approx 4:15 (approx 1.57 Mbit/s) |
Description
While testing uploads and downloads of different file sizes, I observed in the middle of an upload (50MB file, it was at the ~7 min mark) that I was redirected to the "logged out due to inactivity" screen.
I had been doing other testing previously while logged into this account, so it's quite possible I was up against the 2h expiration timeline, but I had been "active" (uploading files), and since an upload was in progress, as a user I would not have expected to be logged out.
Steps to Reproduce
Attempt to upload a file that takes more than SESSION_EXPIRATION_MINUTES ( = 2 hours). Or log in, have a user session that is close to SESSION_EXPIRATION_MINUTES in length, perform some user activity, then towards the end, begin an upload.
Expected Behavior
Upload continues
Actual Behavior
Redirected to "you were logged out due to inactivity" screen.
Comments
My naive expectation was that "activity" (such as clicking buttons, uploading files, etc) would reset SESSION_EXPIRATION_MINUTES. If that's not the case, and a user has two hours total before getting logged off, no matter what, maybe we should advertise that more prominently (in the docs our in the source interface?) so that users are not caught by surprise, especially since file uploads can be slow (I was getting just over 1 Mbit/s best case, and ~ 0.6 Mbit/s average case).
Another thought: we also had this report of being redirected due to inactivity mid file upload - #6737. However, I can't reproduce my issue consistently.
The text was updated successfully, but these errors were encountered: