Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: read ECONNRESET #255

Open
cswank opened this issue May 11, 2023 · 2 comments
Open

Error: read ECONNRESET #255

cswank opened this issue May 11, 2023 · 2 comments

Comments

@cswank
Copy link

cswank commented May 11, 2023

Hello,
I have some tests running on aws lambda and lately they've been failing with the following message:

Run gagoar/invoke-aws-lambda@v3.3.1 with: FunctionName: BackendTests REGION: eu-west-1 AWS_ACCESS_KEY_ID: *** AWS_SECRET_ACCESS_KEY: *** SUCCEED_ON_FUNCTION_FAILURE: false MAX_RETRIES: 0 HTTP_TIMEOUT: 12000000 LogType: Tail Payload: [{"suite": "shipments","verbose": true},{"suite": "shipment-list","verbose": true},{"suite": "shipment-api","verbose": true}] InvocationType: RequestResponse Error: read ECONNRESET
This error seems to happen after around 4-5 minutes even though I set HTTP_TIMEOUT to a very high number and my tests are passing.

@cswank
Copy link
Author

cswank commented May 15, 2023

I tried upgrading to v3.3.2 and it still fails every time. I have several actions that use invoke-aws-lambda, but only my longest running one fails.

The new error message is
Run gagoar/invoke-aws-lambda@v3.3.2 with: FunctionName: BackendTests REGION: eu-west-1 AWS_ACCESS_KEY_ID: *** AWS_SECRET_ACCESS_KEY: *** SUCCEED_ON_FUNCTION_FAILURE: false MAX_RETRIES: 0 HTTP_TIMEOUT: 12000000 LogType: None Payload: [{"suite": "shipments","verbose": true},{"suite": "shipment-list","verbose": true},{"suite": "shipment-api","verbose": true}] InvocationType: RequestResponse Error: Inaccessible host: lambda.eu-west-1.amazonaws.com'. This service may not be available in the eu-west-1' region.

@DavidMakin
Copy link

There is mention online about setting the keep-alive in the http agent but I did not manage to get that to work. I did however manage to hack a fix by updating to aws-sdk-js-v3 which enables keep-alive by default.

The code is a horrible hack and has no tests but I will link to it here in case anyone wants it master...DavidMakin:invoke-aws-lambda:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants