MySQL Communications link failure

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Database operations fail with the following error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)

原因

MySQL server is timing out Bamboo servers' DB connections due to inactivity.

ソリューション

This can be resolved in two ways.

Adding validation query to your Bamboo Server

If you're using a datasource on Tomcat server see, Surviving Connection Closures.

If you're using standalone Bamboo Server, then add the following to your BAMBOO-HOME/bamboo.cfg.xml file and restart Bamboo.

...
   <property name="hibernate.c3p0.validate">true</property>
...

 

Increasing time-out period on MySQL Server.

Alternatively, you can increase the wait_timeout to a greater value in your my.cnf file as per this document and restart MySQL Server.

最終更新日 2013 年 7 月 22 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.