]> cat aescling's git repositories - mastodon.git/commitdiff
Fix S3 adapter retrying failing uploads with exponential backoff (#12085)
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 6 Oct 2019 04:20:57 +0000 (06:20 +0200)
committerGitHub <noreply@github.com>
Sun, 6 Oct 2019 04:20:57 +0000 (06:20 +0200)
The default limit of 10 retries with exponential backoff meant
that if the S3 server was timing out, you would be stuck with it
for much, much longer than the 5 second read timeout we expect.

The uploading happens within a database transaction, which means
a failing S3 server could negatively affect database performance

config/initializers/paperclip.rb

index f308c284115e1da27c9a88038713b9aad04abc62..a0253f4bc05dc8877318a00b93e82e6610f26c5c 100644 (file)
@@ -40,6 +40,7 @@ if ENV['S3_ENABLED'] == 'true'
       http_open_timeout: 5,
       http_read_timeout: 5,
       http_idle_timeout: 5,
+      retry_limit: 0,
     }
   )