Hi @martijn_9956 ,
We've seen this happen in the field a few times, and it seems to be very specific to SQL Server version, the hardware, or something like that. It's a bit of a mystery, because when we import a database backup, the migration happens really quickly. We even tried same version of SQL Server. Another user restored the database to another SQL Server, and it worked fine.
In ProGet 2023.13 (which you're using), we increased the feed migration connection timeout to 1000 seconds (up from 30 seconds), so the fact this this is still happening is totally bizarre. I wonder if you could help troubleshoot, by seeing what's happening on the SQL Server side?
Based on the log messages, the timeout is happening on when executing FeedPackages_UpdatePackageData
; this procedure inputs a Table-valued parameter with 1658 rows (based on your data). Here is the C# code that invokes the query:
await this.Db.FeedPackages_UpdatePackageDataAsync(
Feed_Id: this.FeedId,
Packages_Table: latestVersions.Select(
p =>
new TableTypes.FeedPackageEntry
{
PackageName_Id = p.Key,
Latest_Package_Version = p.Value.LatestVersion?.ToNormalizedUniqueString(),
LatestStable_Package_Version = p.Value.LatestStableVersion?.ToNormalizedUniqueString(),
Total_Download_Count = p.Value.TotalDownloads
}),
DeleteMissing_Indicator: false
).ConfigureAwait(false);
You can peek in SQL Server to see the code, but it's really just doing a straight-forward "upsert" into the FeedPackages
table.
If you attach SQL Profiler, you should be able to see exactly what's going on. The only rough idea we have is that there's something "wrong" with the way we're doing the upsert in FeedPackages_UpdatePackageDataAsync
and some version of the query analyzer is tripping over it (but not reporting a deadlock?)
Any insight would be appreciated, this one's a mystery for now
Thanks,
Alana