Skip to content
This repository has been archived by the owner on Apr 27, 2019. It is now read-only.

Health.Service sometimes hangs #97

Open
rogeralsing opened this issue Oct 15, 2017 · 1 comment
Open

Health.Service sometimes hangs #97

rogeralsing opened this issue Oct 15, 2017 · 1 comment

Comments

@rogeralsing
Copy link

I have the following line:

var statuses = await _client.Health.Service(_clusterName, null, true, CancellationToken.None);

This is polled in a loop in x seconds.
once in a while, this gets completely stuck, never returning.
Even when providing a cancellation token with a cancel timer, this is still the case.

(Same behavior if I use the "blocking query" support where I pass the previous index to the call too)

The never returning part, is that a Consul or Consul.NET bug?
The fact that it ignores the cancellation token makes me think this is a Consul.NET issue.

@highlyunavailable
Copy link
Contributor

It probably is a tasks issue, given what I've seen of "hangs" from this. How thread or task heavy is your application? Could you be using up all threads available in the threadpool for tasks? The code here is super simple - all it's doing at a task level is making a task-based async HTTP request to an endpoint, there's nothing fancy in this method. I agree that it's a "Consul.NET" issue but I don't think it's the code explicitly from Consul.NET - rather, I think there's never a thread available for the task to return on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants