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 Consul connections over consumtion on task monitoring #746

Merged

Conversation

loicalbertin
Copy link
Member

@loicalbertin loicalbertin commented Jun 11, 2021

Pull Request description

Description of the change

What I did

Just added the context to the consul query options.
This context is then passed to the http request used by the Consul client and finally can be used for request cancellation

How to verify it

Generate a high load of job monitoring actions for exemple by using a monitoring interval of 0.5s and monitor the consul connections using for instance lsof. It should remain constant

Description for the changelog

  • Over-consumption of Consul connections (GH-745)

Applicable Issues

Fixes #745
Backported to 4.1.x in PR #747
Backported to 4.1.x in PR #748

This will allow the underlying http request to handle
context cancellation and release the connection
as soon as the local execution is done not after an http timeout
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@laurentganne laurentganne left a comment

Choose a reason for hiding this comment

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

Perfect!

@loicalbertin loicalbertin merged commit a0fa2e2 into develop Jun 11, 2021
@loicalbertin loicalbertin deleted the bugfix/GH-745_Over_consumption_of_Consul_connections branch June 11, 2021 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Over-consumption of Consul connections
2 participants