Does NodeJS AWS-SDK for Kinesis retries failures?

0

I'm trying to put records and when the throughput is heavy, it fails with the following error:

2022-09-22T14:40:19.780Z	9f683c06-e270-43ae-8dd4-b16ffa3df480	ERROR	Invoke Error 	
{
    "errorType": "Error",
    "errorMessage": "Unexpected error: http2 request did not get a response",
    "$metadata": {
        "attempts": 1,
        "totalRetryDelay": 0
    },
    "stack": [
        "Error: Unexpected error: http2 request did not get a response",
        "    at ClientHttp2Stream.<anonymous> (/var/task/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http2-handler.js:105:28)",
        "    at ClientHttp2Stream.emit (events.js:400:28)",
        "    at ClientHttp2Stream.emit (domain.js:475:12)",
        "    at emitCloseNT (internal/streams/destroy.js:87:10)",
        "    at processTicksAndRejections (internal/process/task_queues.js:81:21)"
    ]
}

If I retry manually, the same records work. So, I wonder if the client has retries by default and if it doesn't, will putting retries catch this error and will retry the same request?

gefragt vor 3 Jahren992 Aufrufe
1 Antwort
0

According to the following AWS official documentation, the AWS SDK has a retry feature, but the retry behavior seems to depend on the setting value. [1] [2]

[1] Error retries and exponential backoff in AWS - AWS General Reference
https://docs.aws.amazon.com/general/latest/gr/api-retries.html

[2] Retry behavior - AWS SDKs and Tools
https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html

In AWS SDK for JavaScript, the number of retries can be set in the maxRetries global setting. [3] [4]

[3] Troubleshoot Lambda function retry and timeout issues when using an AWS SDK
https://aws.amazon.com/premiumsupport/knowledge-center/lambda-function-retry-timeout-sdk/?nc1=h_ls

[4] Using the Global Configuration Object - AWS SDK for JavaScript
https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/global-config-object.html

I hope this helps.

profile picture
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen