Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serverless deploy: Recoverable error occurred (write ECONNRESET), sleeping for ~5 seconds. Try 1 of 4

I ve been trying to deploy my GraphQl Apollo Server with nodejs on a Lambda function, on serverless offline it works perfectly, when i try to deploy it it fails with the error: "Recoverable error occurred (write ECONNRESET), sleeping for ~5 seconds. Try 1 of 4" Once the error appears, the console exits the proccess with no other message Once the error appears, the console exits the proccess with no other message

I'm using Typescript and Webpack

What i ve done already:

  1. Verify all dependencies and types
  2. Warnings corrections
  3. Test it with serverless offline plug in and works perfectly on local

yml file:

service: apollo-sever-kisbel

custom:
  webpack:
    webpackConfig: ./webpack.config.js
    includeModules: true


plugins:
  - serverless-webpack
  - serverless-offline

provider:
  name: aws
  runtime: nodejs12.x
  stage: dev


functions:
  graphql:
    handler: lib/index.graphqlHandler
    events:
      - http:
          path: "{proxy+}"
          method: any
          cors: true

Cheers!

like image 969
Hugo Guerrero Avatar asked Apr 11 '20 05:04

Hugo Guerrero


1 Answers

If you have network issues with serverless you can export the AWS variable in your CLI to increase the default timeout export AWS_CLIENT_TIMEOUT=360000

Hope this help you in the future ;)

like image 127
Sayf-Eddine Avatar answered Nov 15 '22 10:11

Sayf-Eddine