juanjoDiaz / serverless-plugin-warmup

Keep your lambdas warm during winter. ♨
MIT License
1.11k stars 113 forks source link

Warmup occurs at 2 minutes, irrespective of given schedule #247

Closed praneetrattan closed 3 years ago

praneetrattan commented 3 years ago

Hello,

I'm using the warmup plugin to avoid cold starts for some of my lambdas. In the config, I set my schedule as every 4 minutes, yet, the warmup lambdas are being called at every 2 minute. Please see the config below and the screenshot of warmups.

I am on v5.0.0 now, but I have seen this happen starting v4.9.x. I tried 5 minutes on schedule, yet the calls were being made every 2 mins.

get:
    handler: account.get
    warmup:
      default:
        enabled: true
        concurrency: 1
        prewarm: false
        events:
          - schedule: rate(4 minutes)
        timeout: 8
        tags:
          stack: account
          stage: staging
          warmer: 'yes'
    events:
      - http:
      ...
Screen Shot 2021-02-07 at 8 40 45 AM
juanjoDiaz commented 3 years ago

This seems similar to #236

Could you check in CloudWatch if the event configured for warmup is setup to 4 minutes as it should or to 2?

The default schedule is 5 minutes. So I have no idea where the number 2 is coming from.

praneetrattan commented 3 years ago

I checked the events on cloudwatch. It shows as being set at 2 minutes. But from where is it picking up this value? under usual cases, what value in decides this event config? My config is set at 4 minutes (or 5 prev).

Screen Shot 2021-02-07 at 10 34 21 PM Screen Shot 2021-02-07 at 10 35 41 PM

I dont see any other set of rules for this stack.

juanjoDiaz commented 3 years ago

That's odd. I searched and the number 2 is nowhere in the codebase... 🤔

Can you share your full yaml? Or at list the custom section where you define the warmer config?

juanjoDiaz commented 3 years ago

Any news on this?

juanjoDiaz commented 3 years ago

Closing since there is no response and the issue can't be reproduced