-
Notifications
You must be signed in to change notification settings - Fork 93
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
Problems with HTTP/2 Invalid Stream #40
Comments
Looks like a bug. Which version of Node.js are you using? Can you please add some instructions on how to reproduce using your repo? |
I am using Node.js 11.11.0 About the repository, you can download the last release, go to settings.yml and do this changes: # Content Delivery Network (CDN)
cdn:
# Enable CDN
enabled: true
# Endpoint
endpoint: altair.projectasterk.com
# Enable HTTP/2
http2: true
# Enable Compress
compress: true After this you can go to index.hbs and add to the code this: <!--Style-->
<link href="/cdn/font/open-sans.css" rel="stylesheet">
<link href="/cdn/framework/bootstrap/4.3.1/bootstrap.min.css" rel="stylesheet">
<!--Script-->
<script src="/cdn/framework/jquery/3.3.1/jquery.min.js"></script>
<script src="/cdn/framework/popper/1.14.7/popper.min.js"></script>
<script src="/cdn/framework/bootstrap/4.3.1/bootstrap.min.js"></script>
<script src="/cdn/framework/fontawesome/5.7.1/fontawesome.min.js"></script> Finished execute npm test and go to https://localhost:3000 How i said the error can occur any time, some times occur in the first request and others in the 100th request for example. |
If you want enable the error stack for Invalid Stream, go to server.js and remove that line: //if (err.name === 'Error [ERR_HTTP2_INVALID_STREAM]') return log('Server: HTTP/2 Invalid Stream', 'erro'); |
Now i got the message from the {"statusCode":500,"code":"ERR_HTTP2_STREAM_ERROR","error":"Internal Server Error","message":"Stream closed with error code NGHTTP2_ENHANCE_YOUR_CALM"} |
Hi @FuyukiWolfer |
Hi @srmarjani, you can force the issue executing sometimes this |
Does this still reproduce? It's supposed to be fixed here: |
In theory yes. Closing for now, it might be we should reopen in case it's still a problem. |
Version: 11.11.0
OS: Windows 10 Home (64-bit)
I am using Fastify HTTP Proxy to get the CDN (S3 + Cloudfront) files and avoid CORS or CSP problems, but sometimes the request fail and generate a error
ERR_HTTP2_INVALID_STREAM
that crash de Node.js Application, so i started observe that and always the request that crash the app was from the proxy.This error decreases a lot, but even so it still occurs, and in addition another error began to appear the
HTTP2_ENHANCE_YOUR_CALM
that after the error all requests from the proxy result in a Internal Server Error (Code: 500) and the only way to resolve that is restarting the app.To try resolve this error, i used GZIP compression from the Cloudfront Server to not compress the files from the CDN by the Fastify Compress, this helped a lot, a way to bypass the Invalid Stream Error is using a UncaughtException what is not secure to use, handling the error the requests throw the error but the app works, the files load and not crash, but i really not want continue doing that.
The normal routes from the Fastify works fine, the only problem is that error that can occur any time, not guaranteeing the stability of the application. So how can i fix that?
Note: I am starting work with JS and Node.js recently, so i may have done something wrong, you can check the code that i am using on my profile, the name is ACS. Thanks!
The text was updated successfully, but these errors were encountered: