com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: socket write error
解决方式:编辑/etc/my.cnf(windows下为my.ini),将超时时间设置为10年,在[mysqld]后面加入:
wait_timeout=315360000
interactive_timeout=31536000
然后重启MySQL
# service mysql restart
搞定。然后重启超时的java连接池程序吧。
show variables like '%timeout%';
本文出处:http://blog.sina.com.cn/s/blog_473f94590100ns44.html