我是jsp的初学者& java.And我开发了一个简单的Web应用程序。 当我在服务器上部署一段时间时,应用程序正常工作。 当我尝试了一段时间服务器返回下列消息后运行我的Web应用程序:HTTP状态500 - 内部服务器错误 - 损坏的管道
HTTP状态500 - 内部服务器错误
型 - 异常报告
消息 - 内部服务器错误
说明 - 服务器遇到内部错误,无法完成此请求。
exception-
javax.servlet.ServletException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 37,611,394 milliseconds ago. The last packet sent successfully to the server was 37,611,394 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
root cause -
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 37,611,394 milliseconds ago. The last packet sent successfully to the server was 37,611,394 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
root cause -
java.net.SocketException: Broken pipe
note - The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.0 logs.
GlassFish Server Open Source Edition 4.0
(不知道哪里出了问题.Still谷歌搜索,但没有运气还)
你能告诉我们你的代码,以便我们可以评估这个问题吗? –
检查数据库连接。 – lvxinrong
[com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接失败]的可能重复(https://stackoverflow.com/questions/2983248/com-mysql-jdbc-exceptions-jdbc4-communicationsexception-communications-link- fai) –