spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

Error: Got RST: REFUSED_STREAM #356

Closed wsjwa closed 5 years ago

wsjwa commented 5 years ago

This error occurs after the second Request if:

There was a closed issue with the same error i guess(#266 ).

stream error

{ '0': Error: Got RST: REFUSED_STREAM
    at Stream._handleRST (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\stream.js:280:24)
    at Stream._handleFrame (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\stream.js:125:10)
    at Connection._handleFrame (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\connection.js:327:12)
    at Parser.<anonymous> (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\connection.js:155:10)
    at emitOne (events.js:116:13)
    at Parser.emit (events.js:211:7)
    at addChunk (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\node_modules\readable-stream\lib\_stream_readable.js:296:12)
    at readableAddChunk (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\node_modules\readable-stream\lib\_stream_readable.js:278:11)
    at Parser.Readable.push (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\node_modules\readable-stream\lib\_stream_readable.js:239:10)
    at Parser.Transform.push (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\node_modules\readable-stream\lib\_stream_transform.js:139:32)
    at next (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\protocol\base\parser.js:53:12)
    at C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\protocol\http2\parser.js:72:5
    at Parser.onRSTFrame (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\protocol\http2\parser.js:368:3)
    at Parser.onFrameBody (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\protocol\http2\parser.js:144:10)
    at Parser.execute (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\protocol\http2\parser.js:64:8)
    at Parser._consume (C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\protocol\base\parser.js:95:8) }

{ '0': Error: Stream write aborted
    at C:\cwc\cwcroot\projects\cockpit\2.0\node_modules\spdy-transport\lib\spdy-transport\stream.js:140:16
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9) }
wmbutler commented 5 years ago

@wsjwa I see you closed this on 3/4. Can you shed some light on your solution? We are fighting with this error and could really use some insight.

wsjwa commented 5 years ago

The error occurred every time i went back in the browser. I deactivated http2 until express has it native.

wmbutler commented 5 years ago

Our solution was to remove the cache value for the page. This forces spdy to re-request the page instead of using the cached page. Not ideal because it's nice to use cache, but we have found that the benefit of http2 on delivery to too much to ignore.