https://serverless-stack.com/ logo
#help
Title
# help
m

Maged Mortaga

06/11/2022, 8:10 PM
Lately I have gotten the error message
Throttling: Rate exceeded
very often when I start my application via
sst start
. Is it possible to find out what causes the Throttling? From the stack trace I am only able to see that is was thrown by the AWS SDK. It always occurs after the console prints the
SST Console: <https://console.serverless-stack.com>
line. If the error is not thrown, which happens after I wait between 10 - 30 minutes, it will print
Debug session started. Listening for requests...
and work again
a

Adrian Schweizer

06/11/2022, 10:00 PM
You could try to find out which api call it is by following these steps: https://aws.amazon.com/premiumsupport/knowledge-center/cloudtrail-rate-exceeded/
m

Maged Mortaga

06/11/2022, 11:27 PM
Thanks for the guide. Turns out the
DescribeStackResource
event causes this issue. It seems to be called 8 times at the same time and this causes an
ThrottlingException
Is there anything we can do on our side to mitigate this problem?
a

Adrian Schweizer

06/12/2022, 12:09 PM
You could maybe try to deploy single stacks to find out which stack it is and then further narrow it down to which resource exactly is causing this. Maybe post the stack config of the respective stack in order for somebody to notice anything unusual in your setup
You can deploy a single stack by appending the stack name after the deploy command
f

Frank

06/13/2022, 6:41 AM
@Maged Mortaga how many stacks do u have in ur app?
m

Maged Mortaga

06/13/2022, 6:42 AM
Including the debug stack 13
f

Frank

06/13/2022, 6:43 AM
I see.
@thdxr I think the
Rate exceeded
error comes from here. It’s fetching the constructs metadata for each stack from CloudFormation. It doesn’t seem we are using the returned
constructs
variable in the code. Can you verify that? https://github.com/serverless-stack/serverless-stack/blob/master/packages/cli/scripts/start.mjs#L107-L123
m

Maged Mortaga

06/13/2022, 3:55 PM
So for the time being we just removed the code in question locally and it solved the issue. So yeah this seems to be the issue. I don’t really know what this is used for because the Console and everything else also just works fine
t

thdxr

06/13/2022, 3:57 PM
yeah this is no longer used with the new event system we have, will remove this