-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Companion downloads/uploads never canceled #3155
Comments
Keep in mind that the continuation of the download is expected behavior for certain people. Example: #3128 |
Ok, if that's a feature we're supporting, then maybe the client shouldn't say "upload failed" if it loses connection, but rather resume its connection with companion and continue receiving progress events? Then we just need to make sure that the companion server has a lot of available space (terabytes), or rewrite companion to be stream based so we don't need to store anything on the server #3098 |
That's already the case, right? The client will try to reconnect and it can continue to receive progress in that case. It's important that clients can "fire and forget", they disconnect to do something else and the upload will finish. |
Hard to test network disconnect locally (because disconnecting wifi would also disconnect the companion upload), but when I did this in the chrome devtools:
then stored the socket as a global variable, and called |
Companion: If the user leaves the uppy upload (closes browser or cancels it), the download seems to keep on going forever until companion has downloaded the whole file to disk. This is not a big issue for small files, but if a user tries many times to upload a 100GB file, it’s gonna quickly fill up the hard drive and starve CPU. There is no method in the Provider API for canceling/aborting downloads, so even if the upload stops, the download will keep on going until finished.
I believe the optimal solution would be that companion server keeps a keep-alive/ping with the client. if the client disappears after X minutes, then cancel the download and the upload
To test this:
Edit: This may also cover the issue of paused uploads possibly not being garbage collected (if they are paused but never resumed by the user)
Further improvements:
The text was updated successfully, but these errors were encountered: