npm install
- Start the server with
node ./src/server.js
in one terminal. - Open 4 terminals and run
while true; do node ./src/client.js ; sleep 3; done
In the ./src/client.js
there are 4 requests executed with Promise.all
and each request has a delay to make sure the client will request the server with intervals of 2 seconds. The client gets a new client and requests the server. The server before replying to the request runs a Promise delay of 3 seconds ( that should not block event loop ) and sleep of 3 seconds ( that should block the event loop ). After a few seconds running 4 instances of the client, you will get assertion failed: cur != GRPC_CHANNEL_SHUTDOWN
.
If we remove max_connection_age_ms
the problem goes away but we then get RST_STREAM
if working with NLB.