Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Hackney pool saturation #971

Merged
merged 2 commits into from
Nov 6, 2024
Merged

Fix Hackney pool saturation #971

merged 2 commits into from
Nov 6, 2024

Conversation

unflxw
Copy link
Contributor

@unflxw unflxw commented Nov 6, 2024

Use separate Hackney pool for transmitter

This relates to the issue reported in #970, where the default Hackney
pool is drained of connections by the check-ins sent by the
transmitter. This does not fix the issue, but ensures that it is
a separate pool, used only by the AppSignal transmitter, that is
drained of connections, rather than the default one, which may be
used by the customer's code.

Close Hackney connections after use

Make sure that Hackney connections are closed after use. This fixes
an issue where the Hackney pool does not correctly claim back
connections, which fixes #970.

Implement a transmit_and_close/3 convenience method in the
transmitter for use cases where the body is not of interest, meaning
that the connection can be immediately closed.

@unflxw unflxw added the bug label Nov 6, 2024
@unflxw unflxw self-assigned this Nov 6, 2024
@backlog-helper
Copy link

backlog-helper bot commented Nov 6, 2024

✔️ All good!

New issue guide | Backlog management | Rules | Feedback

This relates to the issue reported in #970, where the default Hackney
pool is drained of connections by the check-ins sent by the
transmitter. This does not fix the issue, but ensures that it is
a separate pool, used only by the AppSignal transmitter, that is
drained of connections, rather than the default one, which may be
used by the customer's code.
Copy link
Member

@tombruijn tombruijn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing changeset

lib/appsignal/transmitter.ex Outdated Show resolved Hide resolved
@unflxw unflxw force-pushed the fix-hackney-pool-saturation branch from 80827bf to d500693 Compare November 6, 2024 11:41
Make sure that Hackney connections are closed after use. This fixes
an issue where the Hackney pool does not correctly claim back
connections, which fixes #970.

Implement a `transmit_and_close/3` convenience method in the
transmitter for use cases where the body is not of interest, meaning
that the connection can be immediately closed.
@unflxw unflxw force-pushed the fix-hackney-pool-saturation branch from d500693 to 7233adf Compare November 6, 2024 11:43
@unflxw unflxw requested a review from tombruijn November 6, 2024 11:43
@unflxw unflxw merged commit ddc4a88 into main Nov 6, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CheckIn.cron drains hackney pool connections
3 participants