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

RPC exception causes a loop with thousands of requests and log entries each second. #216

Closed
daghb opened this issue Feb 8, 2021 · 0 comments · Fixed by #217
Closed

RPC exception causes a loop with thousands of requests and log entries each second. #216

daghb opened this issue Feb 8, 2021 · 0 comments · Fixed by #217
Assignees
Labels
bug Something isn't working

Comments

@daghb
Copy link

daghb commented Feb 8, 2021

Describe the bug
When calling activateJobsCommand.Send in JobWorker returns an immediate error and casts an exception the while loop is immediately continued and a new Send is initiated just milliseconds after.

Expected behavior
A short delay should be introduced before retrying to stop server hogging.

Enviroment (please complete the following information):

  • .NET Core

Additional context
Original source in JobWorker.cs / line 146 onwards

                try
                {
                    var response = await activateJobsCommand.Send(null, cancellationToken);
                    await HandleActivationResponse(input, response, jobCount);
                }
                catch (RpcException rpcException)
                {
                    LogRpcException(rpcException);
                }

should probably be

                try
                {
                    var response = await activateJobsCommand.Send(null, cancellationToken);
                    await HandleActivationResponse(input, response, jobCount);
                }
                catch (RpcException rpcException)
                {
                    LogRpcException(rpcException);
                    await Task.Delay(pollInterval, cancellationToken);
                }
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.

2 participants