Skip to content

Limit HTTP Connections  #546

@rsrini83

Description

@rsrini83

Hi,

My application is a self host microservice and purpose of this service is to upload multiples files to S3 instance. Each webrequest provides accessKey, secretKey and bucket information and contains 100 files to upload. Each webrequest is associated with an AmazoneS3Client instance, using this instance all 100 files will be pushed to S3 bucket. Looks like AmazonS3Client creating a HTTPConnection pool of 16 i think (Total virtual processors are 16) even though i may use 1 or 2. After a while server seems slow and i could see lot of connections are in TIME_WAIT ( checked using netstat -a).

Now the question here is, How can i restrict connection pool to 2 or 3 instead of 16.

P.S: When i tested with one single request, AmazonS3Client created 2 connections which i'm able to see the in Resource Monitor. So i presumed it creates one HttpWebRequest object per core. I might be wrong. But this is what i observed.

I need to resolve soon. Any help is appreciated. Let me know if any info is required.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions