2016-04-24 197 views
6

当试图执行一个Amazon Web Services(AWS)lambda函数(多次)我们看到的错误:AWS LAMBDA TooManyRequestsException:速度超过

AWS Lambda TooManyRequestsException: Rate Exceeded

我们如何解决这个问题?

+0

你可以清理你的lambda,从CLI'aws lambda delete-function --function-name ...' –

+1

你是否打了[记录的默认安全限制](https://aws.amazon.com/lambda/ faqs /#scalability)100个并发调用? –

回答

11

正如迈克尔指出,这是错误信息,你会看到当你到达记录default "safety" limit of 100 concurrent invocations

"AWS Lambda has a default safety throttle of 100 concurrent executions per account per region. If you wish to submit a request to increase the throttle of 100 concurrent executions you can visit our Support Center..."

解决的办法是打开一个支持票,提供以下信息:

Limit increase request 1 
Service: Lambda 
Region: EU (Ireland) 
Limit name: concurrent requests (average duration * average TPS) 
New limit value: 2000 

然后在机票的机票/要求尝试估计您的使用模式:

Expected average requests per second: 200 
Expected peak requests per second: 2000 
Expected function duration: 2 seconds 
Function memory size: 1000mb 
Invocation Type: Request-response 
Event Source: Api Gateway & Lambda<->Lambda 

,除非你正在为高级支持,所以最好可以采取摆脱AWS支持的响应加载开发/分期和要求增加并发调用在测试您的应用之前你启动你的应用程序!

在我们的案例中,从初始支持请求中花费了45小时以获得调用限制增加。 aws-lambda-limits-increase-request aws-lambda-limits-request-sorted

的AWS支持的人是可爱的,它只是采取了什么感觉年龄近两天!)来获得服务水平增加,这将是致命的,如果我们推出一直公开!