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

GOAWAY/Stream error retries not working consistently #2274

Open
1 task done
Tayyab28 opened this issue Jun 19, 2023 · 0 comments
Open
1 task done

GOAWAY/Stream error retries not working consistently #2274

Tayyab28 opened this issue Jun 19, 2023 · 0 comments

Comments

@Tayyab28
Copy link

Tayyab28 commented Jun 19, 2023

What would you like to discuss?

Hi, I had raised a question sometime back with respect to go away/stream errors : #2179

We fixed it with adding errorCodes to retry handler as mentioned in the doc: https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md

errorCodes added for retries : ['ERR_HTTP2_STREAM_ERROR', 'ERR_HTTP2_GOAWAY_SESSION', 'NGHTTP2_REFUSED_STREAM']

image

Issue:
Retry is configured to happen after 5 seconds.
The above solution works in some cases while it doesn't for some APIs. The 3 behavior I encountered were as follows:

  1. If any of the above error occurs it waits for 5 sec and retries it to max retry limit of 3.
  2. If above error occurs then it waits for 5 sec and continue to next line of code(doesn't retry).
  3. It doesn't even wait for 5 sec to retry.

I'm using multiple APIs with GET,POST & PUT and the behavior is inconsistent in all the methods.

Solution required: What could be the approach to consistently retry when the stream/goAway error occurs with above errorCodes as stated.

Checklist

  • I have read the documentation.
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

No branches or pull requests

1 participant