2017-05-26 20 views
0

私は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 

+1

問題を評価できるように、コードを表示できますか? –

+0

データベース接続を確認します。 – lvxinrong

+0

[com.mysql.jdbc.exceptions.jdbc4.CommunicationsExceptionの可能な複製:通信リンクの障害](https://stackoverflow.com/questions/2983248/com-mysql-jdbc-exceptions-jdbc4-communicationsexception-communications-link- fai) –

答えて

0

おそらくあなたは、これに接続URLを設定する必要はありません(Googleの検索間違った.Stillを行ってきましたが、まだ運がものを知ってはいけません)。

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

なぜ@ Neeson.Zが必要なのでしょうか? –

+0

@ N00bPr0grammer例外から '...またはConnector/J接続プロパティ 'autoReconnect = true'を使用してこの問題を回避すると、MySQLの8時間のタイムアウト問題に該当するようです。 –

関連する問題