AWS SimpleWorkflow请求实体太大

时间:2017-05-31 21:56:14

标签: amazon-web-services amazon-swf

我有一个包含大量活动的工作流程。我将每个活动的响应存储在S3存储桶中。 我将S3键作为每个活动的输入传递。在活动内部,我有一个从S3检索数据并执行某些操作的方法。但是我的上一次活动失败并引发了错误:

Caused by: com.amazonaws.AmazonServiceException: Request entity too large (Service: AmazonSimpleWorkflow; Status Code: 413; Error Code: Request entity too large; Request ID: null)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:820)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:439)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:245)
at com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient.invoke(AmazonSimpleWorkflowClient.java:3173)
at com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient.respondActivityTaskFailed(AmazonSimpleWorkflowClient.java:2878)
at com.amazonaws.services.simpleworkflow.flow.worker.SynchronousActivityTaskPoller.respondActivityTaskFailed(SynchronousActivityTaskPoller.java:255)
at com.amazonaws.services.simpleworkflow.flow.worker.SynchronousActivityTaskPoller.respondActivityTaskFailedWithRetry(SynchronousActivityTaskPoller.java:246)
at com.amazonaws.services.simpleworkflow.flow.worker.SynchronousActivityTaskPoller.execute(SynchronousActivityTaskPoller.java:208)
at com.amazonaws.services.simpleworkflow.flow.worker.ActivityTaskPoller$1.run(ActivityTaskPoller.java:97)
... 3 more

我知道AWS SWF对数据大小有一些限制,但我只是将S3 Key传递给活动。在内部活动中,它将从S3读取并处理数据。我不知道为什么我会收到这个错误。如果有人知道,请帮忙!非常感谢!

1 个答案:

答案 0 :(得分:0)

您的活动失败,因为 respondActivityTaskFailed 在堆栈跟踪中看到了SWF API调用。所以我的猜测是异常消息+堆栈跟踪超过了SWF服务允许的最大大小。