关键词:
No content length specified for stream data. Stream contents will be buffered in memory and could result in out of memory errors.
504 time-out
cos
问题描述:
使用 cos 在线上测试环境上传视频时,出现结果 504 time-out ,日志打印:“No content length specified for stream data. Stream contents will be buffered in memory and could result in out of memory errors.” 但是本地环境的话可以上传成功,不会出现这种情况,线上测试环境上传图片也可以成功。
原因:线上测试环境带宽不足,造成丢包,上传速度慢。cos会提示
No content length specified for stream data. Stream contents will be buffered in memory and could result in out of memory errors.
解决方案:加带宽
网上查:
No content length specified for stream data. Stream contents will be buffered in memory and could result in out of memory errors.
总是提示大家去给上传文件添加长度属性,实测没有帮助。
备注:使用的是 cos Java高级接口。