Skip to content

Commit 65bb6ee

Browse files
zhhyuloic-sharma
andauthored
[HOTFIX] Increase migration's database timeout (#8052) (#8077)
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. Co-authored-by: Loïc Sharma <[email protected]>
1 parent edb3cb9 commit 65bb6ee

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)