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);