Skip to content

Commit abe0d9a

Browse files
Ensure the ShutdownTimeout is set to 2 minutes when installing/updating audit instances
1 parent 2ce99db commit abe0d9a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ServiceControlInstaller.Engine/Configuration/ServiceControl/ServiceControlAuditAppConfig.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ protected override void UpdateSettings()
3030
settings.Set(AuditInstanceSettingsList.ServiceControlQueueAddress, instance.ServiceControlQueueAddress);
3131
settings.Set(AuditInstanceSettingsList.EnableFullTextSearchOnBodies, instance.EnableFullTextSearchOnBodies.ToString().ToLowerInvariant(), version);
3232

33+
// Windows services allow a maximum of 125 seconds when stopping a service.
34+
// When shutting down or restarting the OS we have no control over the
35+
// shutdown timeout. This is by the installer engine that is run _only_ on
36+
// Windows via SCMU or PowerShell
37+
settings.Set(ServiceControlSettings.ShutdownTimeout, "00:02:00");
38+
3339
foreach (var manifestSetting in instance.PersistenceManifest.Settings)
3440
{
3541
if (!settings.AllKeys.Contains(manifestSetting.Name))

0 commit comments

Comments
 (0)