-
Notifications
You must be signed in to change notification settings - Fork 267
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
Upload large files gives timeout error sometimes #1818
Comments
Console uploads as a single stream, there should be no timeouts here AFAIK |
Which version of MinIO is this @moracabanas ? |
I am using RELEASE.2022-04-01T03-41-39Z on docker-compose and nginx as reverse proxy. I also tested the next recommended nginx settings without luck ignore_invalid_headers off;
client_max_body_size 0; # I know this is being applied as it fixed one headers issue using mc to upload large files.
proxy_buffering off; When I check So in my understanding |
Okay, this is because a single PUT operation takes a longer time than the set ResponseHeaderTimeout since you have a slow network. We need to simply remove this value or keep it high enough to cater to slow networks.
|
This is the debug I could do about a single problematic download: Tracing and Troubleshooting
But on the frontend Console I got errors
Once I refresh, the file is properly uploaded. QuestionsHow is my network slow If I am uploading at 300Mbps stable? Sorry about the amount of questions and missunderstanding. Thanks! |
bare in mind |
Could I purpose a change on I think this is caused because the upload triggers a I would do one of the next 4 things to fix this behaviour.
...
@@ Please consider this is the first time I write a single line of Go 😅@@
var DefaultTransport = func(secure bool) (*http.Transport, error) {
tr := &http.Transport{
Proxy: http.ProxyFromEnvironment,
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).DialContext,
MaxIdleConns: 256,
MaxIdleConnsPerHost: 16,
- ResponseHeaderTimeout: time.Minute,
- IdleConnTimeout: time.Minute,
+ ResponseHeaderTimeout: os.Getenv("RESPONSE_HEADER_TIMEOUT") || time.Minute,
+ IdleConnTimeout: os.Getenv("IDLE_CONN_TIMEOUT") || time.Minute,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 10 * time.Second,
// Set this value so that the underlying transport round-tripper
// doesn't try to auto decode the body of objects with
// content-encoding set to `gzip`.
//
// Refer:
// https://golang.org/src/net/http/transport.go?h=roundTrip#L1843
DisableCompression: true,
}
... Feel free to correct any misconception as I've never touched Go before. Thanks you! |
That will not work - multipart is expensive for browser UI. The correct fix is to not have ResponseHeaderTimeout for the PUT call here since it's undefined. |
I think that If we stage the files in the browser we could do multi-part upload, and stop/resume support for both uploads and downloads, which is great for large files @harshavardhana |
Does staging files means you could implement an upload/listing solution where you can make chunks and get callbacks more frecuently on Console? What about handling |
I wouldn't use websockets to transfer large files, it'd be too chatty, but if we do the And yes, staging the files would allow us to pause/resume across sessions, so long as multiple STS sessions can commit a multi part put object which I believe it's possible. |
multipart is going to consume a lot of memory - staging files is not correct. The current implementation is fine, we just have to remove ResponseHeaderTimeout thats all. That is what
|
For cancelable calls, there should be top-level context as needed by the caller. |
I am running minio on Truenas,
mc
client works fine I uploaded 500Gb of photos at my full speed with no issues.Now I am testing Console and getting upload errors.
Uploads starts normally
Some large uploads finished show red and pending.
Then waiting a couple of minutes some of them become green and OK. But others gives 500 error
ERROR:
The text was updated successfully, but these errors were encountered: