Browse code

Fixes #1114 - Reduce connection_max_age to 5s as it looks like that aws closes https conns after around 6s

Florent Viard authored on 2020/06/26 09:23:59
Showing 1 changed files
... ...
@@ -218,10 +218,11 @@ class Config(object):
218 218
     throttle_max = 100
219 219
     public_url_use_https = False
220 220
     connection_pooling = True
221
-    # How long a connection can be kept idle in the pool and still be alive
222
-    # Currently, aws s3 closes connections that are idle for 20 seconds or
223
-    # longer, but 16s is used here by default to be safe.
224
-    connection_max_age = 16
221
+    # How long in seconds a connection can be kept idle in the pool and still
222
+    # be alive. AWS s3 is supposed to close connections that are idle for 20
223
+    # seconds or more, but in real life, undocumented, it closes https conns
224
+    # after around 6s of inactivity.
225
+    connection_max_age = 5
225 226
 
226 227
     ## Creating a singleton
227 228
     def __new__(self, configfile = None, access_key=None, secret_key=None, access_token=None):