V3 JS SDK Kinesis Client getting ERR_HTTP2_INVALID_SESSION error

1

Hi There, I am trying out Kinesis Client in JS SDK V3. When I create a Kinesis Client in the global scope and reuse the same client for all further Kinesis ingestion, I am noticing that after a while I am getting the following error.

1|new-sig      | { Error [ERR_HTTP2_INVALID_SESSION]: The session has been destroyed
1|new-sig      |     at ClientHttp2Session.request (internal/http2/core.js:1559:13)
1|new-sig      |     at Promise (/home/ec2-user/signaling-v7.temasys.io/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http2-handler.js:57:33)
1|new-sig      |     at new Promise (<anonymous>)
1|new-sig      |     at NodeHttp2Handler.handle (/home/ec2-user/signaling-v7.temasys.io/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http2-handler.js:37:16)
1|new-sig      |     at stack.resolve (/home/ec2-user/signaling-v7.temasys.io/node_modules/@aws-sdk/client-kinesis/dist-cjs/commands/PutRecordCommand.js:27:58)
1|new-sig      |     at /home/ec2-user/signaling-v7.temasys.io/node_modules/@aws-sdk/middleware-serde/dist-cjs/deserializerMiddleware.js:5:32
1|new-sig      |     at /home/ec2-user/signaling-v7.temasys.io/node_modules/@aws-sdk/middleware-signing/dist-cjs/middleware.js:11:26
1|new-sig      |     at process._tickCallback (internal/process/next_tick.js:68:7) '$metadata': { attempts: 1, totalRetryDelay: 0 } }

I am not getting an idea as to why this is happening. However when I use a custom requestHandler and disable Keep-Alive the client stops throwing the error (like the below code)

const { NodeHttpHandler } = require("@aws-sdk/node-http-handler");
const { Agent } = require("http");
const kinesisClient = new KinesisClient({ region: kinesisDataStream.region,
  requestHandler: new NodeHttpHandler({
    httpAgent: new Agent({keepAlive: false})
  })});

Could you help me in understanding what's going on ? Thanks a lot.

preguntada hace 2 años465 visualizaciones
1 Respuesta
0

Hi , hope this situation has been resolved by now.

for the next time , or otherwise if you still have the issue. This is a case in which AWS Support should be able to help you, because no general answer may apply and something contextual to your account might be causing the issue.

Your best next steps would be to open a Support case, in case you have not yet a Support subscription, consider to upgrade to Developer Support or Business support depending on the urgency of your case.

Without looking at the internal logs or having more detailed information on the situation it is not possible to provide guidance, sorry.

Hope this helps

AWS
Varun_S
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas