what is the best solutions to mysql connection timeout?
问题 I am writing a small web app in Go, which uses mysql to store data. I got intermittent mysql error if the web sever didn't get any request after some amount of time(> 8 hours): [mysql] 2017/02/08 16:31:56 packets.go:33: unexpected EOF [mysql] 2017/02/08 16:31:56 packets.go:130: write tcp 127.0.0.1:49188->127.0.0.1:3306: write: broken pipe I found some related discussion on github(issue 529, issue 257 and issue 446). From what I understand, mysql db would close the connection if timeout is