grpc-node
grpc-node copied to clipboard
handleUnary - startBatch callback is called with null result.read
Problem description
start batch callback gets called with an empty result object.
call.startBatch(batch, function(err, result) {
...
// sometimes
// result = {read: null}
try {
// throws
emitter.request = handler.deserialize(result.read);
} catch (e) {
...
}
})
Reproduction steps
Send huge amount of request in a short time with a small timeout. In my case sending 500 requests with 50ms timeout through 1 connection using unary streaming from go app.
Environment
- OS name, version and architecture: macOS, linux
- Node version - 8,10,12,14,6
- Node installation method - nvm, docker
- Package name and version
"grpc": "1.24.11"
why is this happening ?
if i debug with the GRPC_TRACE=all env var, I see huge number of requests with "grpc_message":"Received RST_STREAM with error code 8", but only few requests are throwing because of the result.read = null.
So I wonder why and what is causing that.