Skip to content

add S3_READ_TIMEOUT environment variable#14952

Merged
Gargron merged 1 commit intomastodon:masterfrom
tateisu:feature/s3_read_timeout
Oct 6, 2020
Merged

add S3_READ_TIMEOUT environment variable#14952
Gargron merged 1 commit intomastodon:masterfrom
tateisu:feature/s3_read_timeout

Conversation

@tateisu
Copy link
Copy Markdown
Contributor

@tateisu tateisu commented Oct 6, 2020

When using tootctl media remove or media upload from WebUI or client,
I saw many Net::ReadTimeout with #<TCPSocket:(closed)> .
5s default value is too short for cheap storage service.
This PR add S3_READ_TIMEOUT environment variable to configure read timeout.

See also: #12459

@Gargron Gargron merged commit 7919418 into mastodon:master Oct 6, 2020
@tateisu tateisu deleted the feature/s3_read_timeout branch October 6, 2020 23:21
@mashirozx
Copy link
Copy Markdown
Contributor

Suggestion: should we consider different max timeout with different file sizes?

For example we should wait 20 seconds to upload a video but shouldn't wait more than 5 secon for a image.

@tateisu
Copy link
Copy Markdown
Contributor Author

tateisu commented Oct 7, 2020

I don't think the timeout value should be determined by the file size.
It's an unnecessary optimization, It does NOT optimize transfer speed in case of successful upload.

I just want set enough timeout value that might not happen in successful case.

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

Successfully merging this pull request may close these issues.

3 participants