ERR_SPDY_PROTOCOL_ERROR randomly on XHR request
Asked Answered
A

1

6

After a release we started getting competely random ERR_SPDY_PROTOCOL_ERROR in our production application. When we get it we refresh the browser a few times and the error goes away. We can't really reproduce the error but we have managed to capture a detailed chrome net log as it happens. There details of the request where it fails is below.

I would love someone's feedback or help on this as its one of those problems that I wish I wasn't a developer if you know what I mean...

P.S. The technologies that are involved are all tagged here. We use react on the frontend and asp.net / servicestack on the backend. We use haproxy as our load balancer. We only see this error through 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)
Abuse answered 15/1, 2019 at 9:18 Comment(4)
What do you see in the HAProxy log, and what is the version (haproxy -v)?Semidiurnal
Its 1.7.4. When you say the HAProxy log which one should I be looking for? There are obviously quite a few @Michael-sqlbotAbuse
i have this problem to ..........Tharp
Did you get a solution? We are facing same issue...Numen
T
0

Given that the question is from 2015, the short answer was to disable SPDY or HTTP/2.

The client was probably Chrome, because it was the only browser supporting these protocols at the time.

It can be an error in the server, if it accepts HTTP/2 but the implementation is broken and crashing, or it can be an error in Chrome, if it tries to elevate to HTTP/2 when the server doesn't support HTTP/2.

Note that SPDY doesn't exist anymore, it was replaced by HTTP/2. The error code is still named ERR_SPDY_PROTOCOL_ERROR though.

Thirtieth answered 29/7, 2019 at 20:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.