From 7abee8ddac96b4d1911da503fd8b06126c4050b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Sharma?= Date: Mon, 26 Nov 2018 13:35:49 -0500 Subject: [PATCH] Increase the Orchestrator's default connection limit (#677) The Orchestrator used the default connection limit of 2 per server. The Orchestrator processes messages in parallel, each of which may be downloading/uploading large files. Part of https://github.com/NuGet/NuGetGallery/issues/6624 --- src/NuGet.Services.Validation.Orchestrator/Job.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/NuGet.Services.Validation.Orchestrator/Job.cs b/src/NuGet.Services.Validation.Orchestrator/Job.cs index 63af2b731..7eb10a3df 100644 --- a/src/NuGet.Services.Validation.Orchestrator/Job.cs +++ b/src/NuGet.Services.Validation.Orchestrator/Job.cs @@ -47,6 +47,11 @@ namespace NuGet.Services.Validation.Orchestrator { public class Job : JobBase { + /// + /// The maximum number of concurrent connections that can be established to a single server. + /// + private const int MaximumConnectionsPerServer = 64; + private const string ConfigurationArgument = "Configuration"; private const string ValidateArgument = "Validate"; @@ -93,6 +98,8 @@ public class Job : JobBase public override void Init(IServiceContainer serviceContainer, IDictionary jobArgsDictionary) { + ServicePointManager.DefaultConnectionLimit = MaximumConnectionsPerServer; + var configurationFilename = JobConfigurationManager.GetArgument(jobArgsDictionary, ConfigurationArgument); _validateOnly = JobConfigurationManager.TryGetBoolArgument(jobArgsDictionary, ValidateArgument, defaultValue: false);