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.

질문됨 2년 전465회 조회
1개 답변
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
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠