【发布时间】:2018-01-30 22:37:09
【问题描述】:
我目前正在编写一些将多部分对象上传到 S3 的代码,我遇到了这个错误:
Caused by: com.amazonaws.ResetException: Failed to reset the request input stream; If the request involves an input stream, the maximum stream buffer size can be configured via request.getRequestClientOptions().setReadLimit(int)
最初 readLimit 设置为 5MB。我已经更改了代码,以便输入流上的 ReadLimit 将对象大小四舍五入到最接近的 5MB(因为这是 AWS 限制,所以上限为 5GB)。这似乎解决了这个问题,但现在同样的错误出现在新的地方。
对于将 readLimit 设置为什么值以获得最高可靠性,是否有人有任何建议?
任何帮助将不胜感激,
谢谢
泰德
【问题讨论】:
标签: java amazon-web-services amazon-s3 inputstream aws-sdk