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

Over-consumption of Consul connections #745

Closed
loicalbertin opened this issue Jun 11, 2021 · 0 comments · Fixed by #746
Closed

Over-consumption of Consul connections #745

loicalbertin opened this issue Jun 11, 2021 · 0 comments · Fixed by #746
Assignees
Labels
bug Something isn't working

Comments

@loicalbertin
Copy link
Member

Bug Report

Description

When Yorc runs a large number of async operation (typically for jobs monitoring) we noticed an over-consumption of connections to Consul. This is due to the way we monitor tasks errors and cancellation.
We use a long poll connection on tasks flags but we do not properly use context cancellation to detect that we could stop the monitoring.

kvp, qMeta, err := consulutil.GetKV().Get(path.Join(consulutil.TasksPrefix, taskID, flag), &api.QueryOptions{WaitIndex: lastIndex})

This leads to consul connections being still waiting for an HTTP timeout to be released while they are not useful anymore.
When action scheduling interval is low or in case of many different actions then we can consume a very large number of Consul connections on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant