Skip to content

Commit

Permalink
Explicitly set S3 timeouts & retry counts
Browse files Browse the repository at this point in the history
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...?
  • Loading branch information
bdach committed Oct 11, 2024
1 parent bd5b861 commit 337fea1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion osu.Server.Spectator/S3.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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;
Expand All @@ -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),
});
}

Expand Down

0 comments on commit 337fea1

Please sign in to comment.