系统相关
首页 > 系统相关> > nginx net::ERR_HTTP2_SERVER_REFUSED_STREAM 问题参考解决方法

nginx net::ERR_HTTP2_SERVER_REFUSED_STREAM 问题参考解决方法

作者:互联网

实际上造成此问题的核心还是请求并发太大(实际的场景也是这样的,有一个大量的图片现实服务)

环境说明

一般大家部署nginx (openresty)的时候都会开启keepalive_timeout的,当前版本默认是75s,我们使用了65s

可选的优化方法

说明

以上只是在解决碰到问题的一些方法尝试,理论上对于大并发场景,大家基于nginx http2 都会存在类似的问题,可以参考
多看看nignx 的changes还是很有用的(出现问题官方文档应该经常翻),openresty 也是一样的,目前openresty1.21.4 rc1 已经发布了,期待ga,对于nginx
的配置还是应该结合实际业务场景进行调整优化,没有通用的配置,只有不断优化的参数,http2 协议是复杂的,http3 更加
复杂,了解下相关的协议还是很有用的,至少我们排错解决问题会快很多

参考资料

http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_max_concurrent_streams
https://stackoverflow.com/questions/66572034/inconsistent-err-http2-server-refused-stream-error-on-page-load
https://confluence.atlassian.com/jirakb/some-jira-pages-fail-to-render-or-some-actions-fail-to-complete-with-the-error-err_http2_server_refused_stream-1085441145.html
https://nginx.org/en/CHANGES
https://stackoverflow.com/questions/24122506/neterr-insufficient-resources-error-when-adding-numerous-img-elements-to-dom
https://openresty.org/en/ann-1019009001.html

标签:en,STREAM,ERR,1.19,nginx,openresty,http2,REFUSED,com
来源: https://www.cnblogs.com/rongfengliang/p/15920046.html