Skip to content

Too many BOUND connections in case of 503's and 429's on Windows Environments #387

@ghost

Description

We have noticed too many ports with BOUND state leaking as a result of 429's and 503's from server
to clients running on Windows environments

After debugging a bit, we have uncovered an issue with opamp-go library's httpSender.sendRequestWithRetries method, where response body is not getting closed explicitly in case of 429, 503 before going on for retry -
We tried a fix and it looks encouraging (no port leaks).
Currently observing a fix and will submit a patch in couple of days , after verifying there are no further leaks

This happens in windows as explicit call to resp.Body.Close() is necessary to cleanup tcp sockets. In linux because of connection reuse, old connections will get used up

CC : @pavankrish123 , @kelseyma

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