Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
Increase the Orchestrator's default connection limit (#677)
Browse files Browse the repository at this point in the history
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 NuGet/NuGetGallery#6624
  • Loading branch information
loic-sharma authored Nov 26, 2018
1 parent 8459db8 commit 7abee8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/NuGet.Services.Validation.Orchestrator/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ namespace NuGet.Services.Validation.Orchestrator
{
public class Job : JobBase
{
/// <summary>
/// The maximum number of concurrent connections that can be established to a single server.
/// </summary>
private const int MaximumConnectionsPerServer = 64;

private const string ConfigurationArgument = "Configuration";
private const string ValidateArgument = "Validate";

Expand Down Expand Up @@ -93,6 +98,8 @@ public class Job : JobBase

public override void Init(IServiceContainer serviceContainer, IDictionary<string, string> jobArgsDictionary)
{
ServicePointManager.DefaultConnectionLimit = MaximumConnectionsPerServer;

var configurationFilename = JobConfigurationManager.GetArgument(jobArgsDictionary, ConfigurationArgument);
_validateOnly = JobConfigurationManager.TryGetBoolArgument(jobArgsDictionary, ValidateArgument, defaultValue: false);

Expand Down

0 comments on commit 7abee8d

Please sign in to comment.