sst / sst

Build full-stack apps on your own infrastructure.
https://sst.dev
MIT License
22.13k stars 1.68k forks source link

TooManyRequestsException: Rate Exceeded. #4099

Open hanbao-dev opened 2 months ago

hanbao-dev commented 2 months ago

When enabling the warm config with a value of 20, I often get this error when deploying. It will also temporally cause the website to return TooManyRequestsException: Rate Exceeded.

  MyWeb sst:aws:Nextjs → MyWebPrewarm aws:lambda:Invocation
   invoking Lambda Function (MyWebWarmerHandlerFunction): {"errorType":"TooManyRequestsException","errorMessage":"Rate Exceeded.","trace":["TooManyRequestsException: Rate Exceeded.","    at G (file:///var/task/index.mjs:51:174698)","    at uye (file:///var/task/index.mjs:51:128580)","    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","    at async file:///var/task/index.mjs:13:38951","    at async file:///var/task/index.mjs:13:4524","    at async file:///var/task/index.mjs:21:15654","    at async file:///var/task/index.mjs:2:17360","    at async Promise.all (index 6)","    at async t1e (file:///var/task/index.mjs:51:285163)"]}
jayair commented 2 months ago

Just doing a search

https://stackoverflow.com/questions/36826352/aws-lambda-toomanyrequestsexception-rate-exceeded

fwang commented 1 month ago

@danielstevenberger following up on this, what value did u set warming to? And did increasing the account limit help?

harrycollin commented 1 month ago

I've also encountered a similar issue with defaults using the next.js construct. The following response is sometimes produced with HTTP 429 for my next.js deployment.

{"Reason":"ConcurrentInvocationLimitExceeded","Type":"User","message":"Rate Exceeded."}

hanbao-dev commented 1 month ago

@danielstevenberger following up on this, what value did u set warming to? And did increasing the account limit help?

Hey sorry for the delayed response. I can request an increase, but is it normal for that to be caused during deployment. It happens when I have no traffic. I was wondering if it's something with the warmers during deployment causing a temporary spike.