about summary refs log tree commit diff
path: root/config/initializers/paperclip.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-10-06 06:20:57 +0200
committerGitHub <noreply@github.com>2019-10-06 06:20:57 +0200
commit086fc7ed7733c7ec3b51a2513d496670f6a97219 (patch)
treeebb25f46787a0f30c9c4e2226f9bc1f1b78d6640 /config/initializers/paperclip.rb
parentc4fbfaf0b85a589fd669d097471be6bfb82620c6 (diff)
Fix S3 adapter retrying failing uploads with exponential backoff (#12085)
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
Diffstat (limited to 'config/initializers/paperclip.rb')
-rw-r--r--config/initializers/paperclip.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
index f308c2841..a0253f4bc 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -40,6 +40,7 @@ if ENV['S3_ENABLED'] == 'true'
       http_open_timeout: 5,
       http_read_timeout: 5,
       http_idle_timeout: 5,
+      retry_limit: 0,
     }
   )