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

Ensure Health Monitor HTTP connections are closed #2510

Merged
merged 1 commit into from Apr 11, 2024

Conversation

ystros
Copy link
Contributor

@ystros ystros commented Apr 5, 2024

What is this change about?

When EventMachine was removed from Health Monitor in favor of async-http, it neglected to explicitly close the Async::Http::Client objects. This results in connections to the Director on port 25555 to constantly accumulate and remain in a CLOSE_WAIT state. This can result in problems with NATS, such as the bosh-nats-sync process being unable to connect to the Director to get a list of valid clients.

Fixes #2509

What tests have you run against this PR?

  • Applied changes to a live Director and restarted the health_monitor process. Observed HM logs and open connections with netstat during normal operation + when the resurrector plugin was triggered.
  • Ran unit tests locally

When EventMachine was removed from Health Monitor in favor of
async-http, it neglected to explicitly close the Async::Http::Client
objects. This results in connections to the Director on port 25555 to
constantly accumulate and remain in a CLOSE_WAIT state. This can result
in problems with NATS, such as the bosh-nats-sync process being unable
to connect to the Director to get a list of valid clients.
@beyhan beyhan merged commit 4df9261 into main Apr 11, 2024
4 checks passed
@beyhan beyhan deleted the close-http-connections branch April 11, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

health_monitor is leaking connections
3 participants