XHR请求上随机产生ERR_SPDY_PROTOCOL_ERROR

时间:2019-01-15 09:18:39

标签: asp.net .net reactjs google-chrome haproxy

发布后,我们开始在生产应用程序中竞争性地出现随机ERR_SPDY_PROTOCOL_ERROR。当我们得到它时,我们刷新浏览器几次,错误消失了。我们无法真正重现该错误,但是我们已经设法捕获了发生时的详细chrome net日志。请求失败的详细信息如下。

我希望有人对此提供反馈或帮助,因为如果您了解我的意思,我希望我不是开发人员。

P.S。所涉及的技术都在此处标记。我们在前端使用react,在后端使用asp.net / servicestack。我们使用haproxy作为我们的负载均衡器。我们只能通过chrome看到此错误。

89365: URL_REQUEST https://api-domain.com/some/path?page=1&pageSize=10 Start Time: 2019-01-15 11:11:15.029 t=255420 [st=    0] +REQUEST_ALIVE [dt=10068]
                     --> priority = "MEDIUM"
                     --> url = "https://api-domain.com/some/path?page=1&pageSize=10" t=255421 [st=    1]    NETWORK_DELEGATE_BEFORE_URL_REQUEST  [dt=0] t=255421 [st=    1] 
+URL_REQUEST_START_JOB  [dt=10066]
                       --> load_flags = 17216 (DO_NOT_SAVE_COOKIES | DO_NOT_SEND_AUTH_DATA | DO_NOT_SEND_COOKIES | MAYBE_USER_GESTURE)
                       --> method = "GET"
                       --> url = "https://api-domain.com/some/path?page=1&pageSize=10" t=255421 [st=    1]      NETWORK_DELEGATE_BEFORE_START_TRANSACTION  [dt=0] t=255421 [st=    1]      HTTP_CACHE_GET_BACKEND  [dt=0] t=255421 [st=    1]     HTTP_CACHE_OPEN_ENTRY  [dt=0] t=255421 [st=    1]      HTTP_CACHE_ADD_TO_ENTRY  [dt=0] t=255421 [st=    1]      HTTP_CACHE_READ_INFO  [dt=0] t=255421 [st=    1]    
+HTTP_STREAM_REQUEST  [dt=0] t=255421 [st=    1]        HTTP_STREAM_JOB_CONTROLLER_BOUND
                           --> source_dependency = 89366 (HTTP_STREAM_JOB_CONTROLLER) t=255421 [st=    1]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                           --> source_dependency = 89367 (HTTP_STREAM_JOB) t=255421 [st=    1]     -HTTP_STREAM_REQUEST t=255421 [st=    1]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=1] t=255421 [st=    1]        HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS
                           --> :authority: api-domain.com
                               :method: GET
                               :path: /some/path?page=1&pageSize=10
                               :scheme: https
                               accept: application/json, text/plain, */*
                               accept-encoding: gzip, deflate, br
                               accept-language: en-US,en;q=0.9,el;q=0.8
                               origin: https://some-other-path.com
                               referer: https://some-other-path.com/
                               user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
                               x-somekey: random-guid t=255422 [st=    2]     -HTTP_TRANSACTION_SEND_REQUEST t=255422 [st=    2]    
+HTTP_TRANSACTION_READ_HEADERS  [dt=10065] t=265487 [st=10067]        HTTP2_STREAM_ERROR
                           --> description = "Server reset stream."
                           --> net_error = "ERR_SPDY_PROTOCOL_ERROR"
                           --> stream_id = 3 t=265487 [st=10067]     -HTTP_TRANSACTION_READ_HEADERS
                         --> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR) t=265487 [st=10067]   -URL_REQUEST_START_JOB
                       --> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR) t=265488 [st=10068]    URL_REQUEST_DELEGATE_RESPONSE_STARTED  [dt=0] t=265488 [st=10068] -REQUEST_ALIVE
                     --> net_error = -337 (ERR_SPDY_PROTOCOL_ERROR)

1 个答案:

答案 0 :(得分:0)

鉴于问题出在2015年,简短的答案是禁用SPDY或HTTP / 2。

客户端可能是Chrome,因为它是当时唯一支持这些协议的浏览器。

如果它接受HTTP / 2但实现被破坏并崩溃,则可能是服务器中的错误,或者如果在服务器不支持时尝试提升为HTTP / 2,则可能是Chrome中的错误。支持HTTP / 2。

请注意,SPDY不再存在,已由HTTP / 2代替。错误代码仍然命名为ERR_SPDY_PROTOCOL_ERROR