close
The Wayback Machine - https://web.archive.org/web/20201114121258/https://github.com/letsencrypt/boulder/pull/4324
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

Add better error message for timeouts. #4324

Merged
merged 2 commits into from Jul 8, 2019
Merged

Add better error message for timeouts. #4324

merged 2 commits into from Jul 8, 2019

Conversation

@jsha
Copy link
Contributor

@jsha jsha commented Jul 4, 2019

Right now we sometimes get errors like:

rpc error: code = Unknown desc = rpc error:
code = DeadlineExceeded desc = context deadline exceeded

For instance, when an SA call times out, and the RA returns that
timed-out error to the WFE. These are kind of confusing because they
have two layers of nested gRPC error, and they don't provide additional
information about which SA call timed out.

This change replaces DeadlineExceeded errors with our own error type
that includes the service and the method that were called, as well as
the amount of time it took (which helps understand if timeouts are
happening because earlier calls ate up time towards the deadline).

When the RA->SA NewOrder call times out, and the RA returns that error to WFE:

"InternalErrors":["rpc error: code = Unknown desc =
sa.StorageAuthority.NewOrder timed out after 14954 ms"]

When the WFE->RA NewOrder call times out:

"InternalErrors":["ra.RegistrationAuthority.NewOrder timed out after 15000 ms"]

Note that this change only handles timeouts at one level deep, which I
think is sufficient for our needs.

Fixes #4321

Right now we sometimes get errors like:

rpc error: code = Unknown desc = rpc error:
  code = DeadlineExceeded desc = context deadline exceeded

For instance, when an SA call times out, and the RA returns that
timed-out error to the WFE. These are kind of confusing because they
have two layers of nested gRPC error, and they don't provide additional
information about which SA call timed out.

This change replaces DeadlineExceeded errors with our own error type
that includes the service and the method that were called, as well as
the amount of time it took (which helps understand if timeouts are
happening because earlier calls ate up time towards the deadline).

When the RA->SA NewOrder call times out, and the RA returns that error to WFE:

"InternalErrors":["rpc error: code = Unknown desc =
  sa.StorageAuthority.NewOrder timed out after 14954 ms"]

When the WFE->RA NewOrder call times out:

"InternalErrors":["ra.RegistrationAuthority.NewOrder timed out after 15000 ms"]

Note that this change only handles timeouts at one level deep, which I
think is sufficient for our needs.
@jsha jsha requested a review from letsencrypt/boulder-developers as a code owner Jul 4, 2019
grpc/interceptors.go Show resolved Hide resolved
grpc/interceptors_test.go Show resolved Hide resolved
@cpu
cpu approved these changes Jul 8, 2019
Copy link
Contributor

@cpu cpu left a comment

Thanks @jsha

@cpu
Copy link
Contributor

@cpu cpu commented Jul 8, 2019

Merging with one 🔍 based on available reviewers.

@cpu cpu merged commit e3f797f into master Jul 8, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@cpu cpu deleted the annotate-timeouts branch Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.