Skip to content

Commit 9c0ab38

Browse files
Set the default shutdown timeout to the max allowed by the most restrictive hosting platform
1 parent 599b508 commit 9c0ab38

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/ServiceControl/Infrastructure/Settings/Settings.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,9 @@ public TimeSpan HeartbeatGracePeriod
181181

182182
public bool DisableHealthChecks { get; set; }
183183

184-
// Windows services allow a maximum of 125 seconds when stopping a service.
185-
// When shutting down or restarting the OS we have no control over the
186-
// shutdown timeout
187-
public TimeSpan ShutdownTimeout { get; set; } = TimeSpan.FromMinutes(2);
184+
// The default value is set to the maximum allowed time by the most restrictive
185+
// hosting platform, which Docker Linux containers.
186+
public TimeSpan ShutdownTimeout { get; set; } = TimeSpan.FromSeconds(10);
188187

189188
public string GetConnectionString()
190189
{

0 commit comments

Comments
 (0)