我有一个Lambda函数,它需要几个数组(〜6)并返回所有可能的组合。
当有数百种可能的组合时,Lambda成功。但是,当有数千种可能性时,我会失败(下面的响应)。
请注意,我正在双向压缩/解压缩JSON,以使有效负载尽可能小。
我正在使用最大内存(1536)和20秒超时来运行它。
关于什么原因的任何想法?
{
"state": "rejected",
"reason": {
"name": "StatusCodeError",
"statusCode": 504,
"message": "504 - [object Object]",
"error": {
"message": "Endpoint request timed out"
},
"options": {
"uri": "https://blahblah/prod/getCombinations",
"method": "POST",
"timeout": 120000,
"json": {...
},
"simple": true,
"resolveWithFullResponse": false
},
"response": {
"statusCode": 504,
"body": {
"message": "Endpoint request timed out"
},
"headers": {
"content-type": "application/json",
"content-length": "41",
"connection": "close",
"date": "Thu, 20 Aug 2015 20:39:53 GMT",
"x-amzn-requestid": "965d3b8d-477b-11e5-99d6-4102846d4b1e",
"x-cache": "Error from cloudfront",
"via": "1.1 b1103856e287e98f322630821d3c6e5b.cloudfront.net (CloudFront)", …Run Code Online (Sandbox Code Playgroud)