question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin timing out without doing anything when running in VPC

See original GitHub issue

Hi,

I’m currently using Serverless 1.13.2.and using serverless-plugin-warmup to warmup my lambdas.

The warmup lambda is correctly invoked every 5 minutes. However, it doesn’t actually call any of my lambdas and eventually times out. I’ve increased the time out to several minutes and it still doesn’t call anything and simply times out.

The logs don’t tell much either:

START RequestId: 37f7c285-4b45-11e7-85cb-c75ba9915e76 Version: $LATEST
2017-06-07T05:50:33.990Z	37f7c285-4b45-11e7-85cb-c75ba9915e76	Warm Up Start
END RequestId: 37f7c285-4b45-11e7-85cb-c75ba9915e76
REPORT RequestId: 37f7c285-4b45-11e7-85cb-c75ba9915e76	Duration: 10000.97 ms	Billed Duration: 10000 ms Memory Size: 128 MB	Max Memory Used: 32 MB
2017-06-07T05:50:43.982Z 37f7c285-4b45-11e7-85cb-c75ba9915e76 Task timed out after 10.00 seconds

Any hint of what the problem might be?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
contrarianaupongcommented, Aug 6, 2018

You can set the warmup to use no VPC, while others functions with VPC Simply override the vpc setting in warmup by adding vpc: securityGroupIds: [] subnetIds: []

Here is the reference. https://github.com/serverless/serverless/issues/4387#issuecomment-337116499

0reactions
JerseyGoodcommented, Jan 15, 2019

@contrarianaupong 's way works

but need to hack into addWarmUpFunctionToService() (I don’t other ways around)

   /** SLS warm up function */
    this.serverless.service.functions.warmUpPlugin = {
      description: 'Serverless WarmUP Plugin',
      events: this.warmup.schedule.map(schedule => ({ schedule })),
      handler: this.pathHandler,
      memorySize: this.warmup.memorySize,
      name: this.warmup.name,
      runtime: 'nodejs8.10',
      package: {
        individually: true,
        exclude: ['**'],
        include: [this.folderName + '/**']
      },
      timeout: this.warmup.timeout,
      // override provider level of VPC settings.
      vpc: {
        securityGroupIds: [],
        subnetIds: []
      }
    }

A better alternative would be Not using Provider VPC settings and set Function VPC Configurations one by one, which leaves warmup function “out of VPC”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugin timing out without doing anything when running in VPC
Hi, I'm currently using Serverless 1.13.2.and using serverless-plugin-warmup to warmup my lambdas. The warmup lambda is correctly invoked ...
Read more >
Troubleshoot Lambda function invocation timeout errors - AWS
Retrieve the request IDs of any timed-out invocations by searching the function's Amazon CloudWatch log group for the phrase, Task timed out.
Read more >
New relic extension integrated lambda timing out - Serverless
Function call returns response within few seconds but invocation doesn't end until the function timeout is reached. Looks like lambda extension ...
Read more >
Debugging AWS Lambda Timeouts - Lumigo
In this post, AWS Serverless Hero Yan Cui explores several ways to spot and debug AWS Lambda timeouts, including tools such as X-Ray...
Read more >
Possible reasons for timeout when trying to access EC2 instance
The most likely one is that the Security Group is not configured properly to provide SSH access on port 22 to your i.p....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found