From d8361ff1d69e927fa4cec02606c4643d4d16492b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 25 Mar 2019 14:50:03 -0400 Subject: [PATCH] Wait 20 seconds to allow database to come online --- src/Admin/HostedServices/DatabaseMigrationHostedService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Admin/HostedServices/DatabaseMigrationHostedService.cs b/src/Admin/HostedServices/DatabaseMigrationHostedService.cs index 90fb8f4e64..f42c71bd46 100644 --- a/src/Admin/HostedServices/DatabaseMigrationHostedService.cs +++ b/src/Admin/HostedServices/DatabaseMigrationHostedService.cs @@ -29,6 +29,9 @@ namespace Bit.Admin.HostedServices public virtual async Task StartAsync(CancellationToken cancellationToken) { + // Wait 20 seconds to allow database to come online + await Task.Delay(20000); + var maxMigrationAttempts = 10; for(var i = 1; i <= maxMigrationAttempts; i++) {