-
Notifications
You must be signed in to change notification settings - Fork 687
Open
Labels
Description
Problem description
@grpc/grpc-js throw 'Received RST_STREAM with code 0' with retry enabled
Reproduction steps
- Start an example
HelloWorldGolanggrpcserver in Kubernetes and enable the istio sidecar - To reduce the connection reset(
reset reason: connection termination), we set themax_concurrent_streams: 256 - Making multi-calls same time by nodeJs with large responses (like response size 6k/per request, and 1000 requests)
- Got Error: 13 INTERNAL: Received RST_STREAM with code 0
Environment
- Kubernetes with istio envoy sidecar enabled(Thanks
orbstackKubernetes environment, I can debug this error in local VSCode environment)- NodeJs -> client sidecar(envoy) -> server
- NodeJs -> server sidecar(envoy) -> server
- NodeJs -> client sidecar(envoy) -> server sidecar(envoy) -> server
- Node version: v16.18.1
- Node installation method: Docker image
- If applicable, compiler version: N/A
- Package name and version:
@grpc/grpc-jsversion > 1.7.3
Additional context
Logs with GRPC_TRACE=all GRPC_VERBOSITY=DEBUG
D 2023-09-09T23:58:35.160Z | load_balancing_call | [1513] Received metadata
D 2023-09-09T23:58:35.160Z | retrying_call | [1512] Received metadata from child [1513]
D 2023-09-09T23:58:35.160Z | retrying_call | [1512] Committing call [1513] at index 0
D 2023-09-09T23:58:35.160Z | resolving_call | [256] Received metadata
D 2023-09-09T23:58:35.160Z | subchannel_call | [3256] HTTP/2 stream closed with code 0
D 2023-09-09T23:58:35.160Z | subchannel_call | [3256] ended with status: code=13 details="Received RST_STREAM with code 0"
D 2023-09-09T23:58:35.160Z | load_balancing_call | [1513] Received status
D 2023-09-09T23:58:35.160Z | load_balancing_call | [1513] ended with status: code=13 details="Received RST_STREAM with code 0"
D 2023-09-09T23:58:35.160Z | retrying_call | [1512] Received status from child [1513]
D 2023-09-09T23:58:35.160Z | retrying_call | [1512] state=COMMITTED handling status with progress PROCESSED from child [1513] in state ACTIVE
D 2023-09-09T23:58:35.160Z | retrying_call | [1512] ended with status: code=13 details="Received RST_STREAM with code 0"
D 2023-09-09T23:58:35.160Z | resolving_call | [256] Received status
D 2023-09-09T23:58:35.160Z | resolving_call | [256] ended with status: code=13 details="Received RST_STREAM with code 0"
Error: 13 INTERNAL: Received RST_STREAM with code 0
at callErrorFromStatus (/[redacted]/grpc-node/examples/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
at Object.onReceiveStatus (/[redacted]/grpc-node/examples/node_modules/@grpc/grpc-js/build/src/client.js:192:76)
at Object.onReceiveStatus (/[redacted]/grpc-node/examples/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
at Object.onReceiveStatus (/[redacted]/grpc-node/examples/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
at /[redacted]/grpc-node/examples/node_modules/@grpc/grpc-js/build/src/resolving-call.js:94:78
at processTicksAndRejections (node:internal/process/task_queues:78:11)
for call at
at ServiceClientImpl.makeUnaryRequest (/[redacted]/grpc-node/examples/node_modules/@grpc/grpc-js/build/src/client.js:160:32)
at ServiceClientImpl.<anonymous> (/[redacted]/grpc-node/examples/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
at /[redacted]/grpc-node/examples/helloworld/dynamic_codegen/client.js:73:14
at new Promise (<anonymous>)
at main (/[redacted]/grpc-node/examples/helloworld/dynamic_codegen/client.js:72:21)
at Object.<anonymous> (/[redacted]/grpc-node/examples/helloworld/dynamic_codegen/client.js:102:1)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12) {
code: 13,
details: 'Received RST_STREAM with code 0',
metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}
Methods I can apply
- Disable
grpc.enable_retriesby setgrpc.enable_retries = 0 - Downgrade to the version
1.7.3
It seems we can just ignore this error, and doesn't affect the results.
RST_STREAM with code NO_ERROR in HTTP2 RFC Error Codes
There are some similar cases in other projects:
- Issue 650438:
CronettreatsRST_STREAMwith code NO_ERROR as aSPDYfailure (error -337) - Issue 603182:
RST_STREAMwith NO_ERROR isn't handledproperly - HTTP/2: send WINDOW_UPDATE instead of
RST_STREAMwith NO_ERROR. - HTTP/2: switched back to
RST_STREAMwith NO_ERROR.
So can we just ignore this NO_ERROR in the Node js SDK? Thanks in advance.
inetfuture, vadshalamov and shanghaikid