Skip to content

Commit

Permalink
[HOTFIX] Increase migration's database timeout (#8052)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
loic-sharma authored Jun 17, 2020
1 parent 64d210f commit 84ea589
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/NuGetGallery/Migrations/MigrationsConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
using System.Data.Entity.Migrations;
using System.Linq;
using NuGet.Services.Entities;
Expand All @@ -12,6 +13,7 @@ public class MigrationsConfiguration : DbMigrationsConfiguration<EntitiesContext
public MigrationsConfiguration()
{
AutomaticMigrationsEnabled = false;
CommandTimeout = (int)TimeSpan.FromMinutes(30).TotalSeconds;
}

protected override void Seed(EntitiesContext context)
Expand Down

0 comments on commit 84ea589

Please sign in to comment.