Skip to content

HttpEventCollectorSender creates thousands of sockets under load #52

@maxiptah

Description

@maxiptah

I am using your package with HttpEventCollectorTraceListener in order to send logs to Splunk from an Azure app. There are bursts in logs where thousands of messages are sent in a couple of minutes. It looks like HttpClient inside HttpEventCollectorSender is not reusing open sockets and number of sockets in TIME_WAIT is increasing rapidly. After 2 minutes the app runs out of sockets (see screenshot).

Can you please comment on this behavior? Is this expected? I'm aware that it's normal for a socket to stay in TIME_WAIT, but why new sockets are being opened? Cannot the HttpEventCollectorSender just push messages on one/several sockets that are always open?

I've tried to feed a SocketsHttpHandler into HttpEventCollectorSender with pooled connection settings, but to no avail.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions