From 337fea1427dfd680d0136925e2f2916120c64e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Fri, 11 Oct 2024 21:18:46 +0200 Subject: [PATCH] Explicitly set S3 timeouts & retry counts The timeout in particular seems to be set to a stupidly large value by default. Not sure if the new values are better, but at least they're not ~24 days...? --- osu.Server.Spectator/S3.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Server.Spectator/S3.cs b/osu.Server.Spectator/S3.cs index 5e823618..9215ef6a 100644 --- a/osu.Server.Spectator/S3.cs +++ b/osu.Server.Spectator/S3.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; using System.IO; using System.Threading.Tasks; using Amazon; @@ -20,7 +21,10 @@ private static AmazonS3Client getClient(RegionEndpoint? endpoint = null) HttpClientCacheSize = 32, RegionEndpoint = endpoint ?? RegionEndpoint.USWest1, UseHttp = true, - ForcePathStyle = true + ForcePathStyle = true, + RetryMode = RequestRetryMode.Legacy, + MaxErrorRetry = 5, + Timeout = TimeSpan.FromSeconds(10), }); }