tomcat链接mysql时超时报错java.io.EOFException: Can not read response from server. Expected to read 4 bytes,

Posted 火凤凰

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat链接mysql时超时报错java.io.EOFException: Can not read response from server. Expected to read 4 bytes,相关的知识,希望对你有一定的参考价值。

需要在配置文件里加上下面就ok了

<property name=”minEvictableIdleTimeMillis” value=”1800000″ />
<property name=”numTestsPerEvictionRun” value=”3″ />
<property name=”testOnBorrow” value=”true” />
<property name=”testWhileIdle” value=”true” />
<property name=”testOnReturn” value=”true” />
<property name=”validationQuery” value=”SELECT 1″ />

以上是关于tomcat链接mysql时超时报错java.io.EOFException: Can not read response from server. Expected to read 4 bytes,的主要内容,如果未能解决你的问题,请参考以下文章

原!tomcat启动超时(打印了几行日志,后面没了。也不报错,处于启动状态,直到超时)

Apache Tomcat: mod_jk 连接超时cping/cpong timeout

springboot报错说 Failed to parse multipart servlet request; nested exception is java.io.IOException

springboot报错说 Failed to parse multipart servlet request; nested exception is java.io.IOException

springboot报错说 Failed to parse multipart servlet request; nested exception is java.io.IOException

Tomcat、Hibernate 和 java.io.EOFException