swift-server/async-http-client

[HTTP2] Auto retry requests that where send on a stream higher than lastStreamID

fabianfett opened this issue · 1 comments

Follow up from: #488

Observed behavior

We see errors for requests that were scheduled in race conditions with GOAWAY streams.

Expected behavior

If a request was scheduled on an http2 stream with a streamID higher than the lastStreamID of the GOAWAY frame, then this request is save to rerun. We should do this.

Just want to give an update about the original issue (#488) after ~ a year and a half.
The update is ... Since yesterday I've enabled back http2 requests and this time the server doesn't start to fail requests after a few hours (which used to be the case).
However, one request fails every once in a while with a stream-closed error:

StreamClosed(streamID: HTTP2StreamID(20001), errorCode: HTTP2ErrorCode<0x8 Cancel>, location: "NIOHTTP2/HTTP2StreamChannel.swift:827")

The timings of those errors is not consistent but i can see a pattern. The errors happen every 20 or multitude of 20 minutes. So sometimes after 20 minutes, sometimes after an hour, up to maybe, let's say, 2 hours.
The stream ids are also always very close to 20000 (20001/20003).