java.net.SocketTimeoutException: Read timed out

读取大文件耗时较长,超过了tomcat限制的一条连接的生存时间,导致tomcat判定连接超时
解决方案:在tomcat中修改server.xml,配置如下:

               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000" disableUploadTimeout="false"
               redirectPort="8443" />
或者:
Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
				keepAliveTimeout="100000"
               redirectPort="8443" />

你可能感兴趣的:(java.net.SocketTimeoutException: Read timed out)