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 Error with http package (got) #2179

Open
1 task done
Tayyab28 opened this issue Nov 15, 2022 · 4 comments
Open
1 task done

GOAWAY Error with http package (got) #2179

Tayyab28 opened this issue Nov 15, 2022 · 4 comments

Comments

@Tayyab28
Copy link

Tayyab28 commented Nov 15, 2022

What would you like to discuss?

Hi, I'm getting "New streams cannot be created after receiving a GOAWAY" error when there is a good amount of load on the services. How to get rid of this issue and let services continue to create the streams.

Dependencies:

  • Node.js Version 16+
  • got Version 11.8.1
  • http2-wrapper Version ^2.0.7

await got.post('url', { timeout: 10000, responseType: 'json',maxContentLength: Infinity, http2: true } );

Checklist

  • I have read the documentation.
@Tayyab28
Copy link
Author

@mkaufmaner , your PR is still not merged and I'm working on a project which is on Production. I can only take the changes if it is deployed to Master in http2-wrapper.

@prabhatmishra33
Copy link

prabhatmishra33 commented May 18, 2023

we had a quite bumpy ride to resolve this and finally we did this using the errorCodes present in the options config of GOT and it worked!

ref doc link: https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md#errorcodes

errorCodes: ['ERR_NON_2XX_3XX_RESPONSE', 'ERR_HTTP2_STREAM_ERROR', 'ERR_HTTP2_GOAWAY_SESSION', 'NGHTTP2_REFUSED_STREAM']

So i believe there is no change needed in the package for handling this!

@mkaufmaner
Copy link

mkaufmaner commented May 18, 2023

we had a quite bumpy ride to resolve this and finally we did this using the errorCodes present in the options config of GOT and it worked!

ref doc link: https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md#errorcodes

errorCodes: ['ERR_NON_2XX_3XX_RESPONSE', 'ERR_HTTP2_STREAM_ERROR', 'ERR_HTTP2_GOAWAY_SESSION', 'NGHTTP2_REFUSED_STREAM']

So i believe there is no change needed in the package for handling this!

@prabhatmishra33 While that does work, the point of this PR (szmarczak/http2-wrapper#90) is to avoid the error all together by handling the GOAWAY event gracefully.

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

3 participants