gpt4 book ai didi

java - HTTP 状态 500 - 内部服务器错误 - 管道损坏

转载 作者:行者123 更新时间:2023-11-29 18:55:02 25 4
gpt4 key购买 nike

我是 jsp 和 java 的初学者。我开发了一个简单的 Web 应用程序。当我在服务器上部署一段时间后,应用程序工作正常。当我尝试在一段时间后运行我的 Web 应用程序时,服务器返回以下消息:

HTTP Status 500 - Internal Server Error

类型 - 异常报告

消息 - 内部服务器错误

描述 - 服务器遇到内部错误,导致其无法满足此请求。

异常-

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

(不知道出了什么问题。仍在搜索 Google,但还没有运气)

最佳答案

可能您需要将连接 URL 设置为此。

jdbcUrl = jdbc:mysql://localhost:3306/yourdatabase?useUnicode=yes&characterEncoding=utf8&autoReconnect=true&verifyServerCertificate=false&useSSL=false

关于java - HTTP 状态 500 - 内部服务器错误 - 管道损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44192981/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com