Skip to content

Commit 84ea589

Browse files
authored
[HOTFIX] Increase migration's database timeout (#8052)
We added a migration to add an index on the `PackageDependencies` table. This migration takes longer than 30 seconds to run on PROD and is timing out. This change increases the timeout to 30 minutes which we hope is enough to create the new index.
1 parent 64d210f commit 84ea589

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/NuGetGallery/Migrations/MigrationsConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
using System;
45
using System.Data.Entity.Migrations;
56
using System.Linq;
67
using NuGet.Services.Entities;
@@ -12,6 +13,7 @@ public class MigrationsConfiguration : DbMigrationsConfiguration<EntitiesContext
1213
public MigrationsConfiguration()
1314
{
1415
AutomaticMigrationsEnabled = false;
16+
CommandTimeout = (int)TimeSpan.FromMinutes(30).TotalSeconds;
1517
}
1618

1719
protected override void Seed(EntitiesContext context)

0 commit comments

Comments
 (0)