【java】上传文件java.io.IOException: UT000128: Remote peer closed connection before all data could be read

1.错误截图

【java】上传文件java.io.IOException: UT000128: Remote peer closed connection before all data could be read_第1张图片

2.原因

1.在读取所有数据之前,远程对等方已关闭连接
2.file文件比较大,读取时间过长,前端请求timeout超时,中断了请求

3.解决

检查前端timeout超时时间,太小可以设置大一点(封装的一些前端组件有默认的timeout)
检查网络带宽,缩短上传时间

你可能感兴趣的:(java,java)