1. 程式人生 > >徹底解決"The last packet successfully received from the server was * milliseconds ago"問題

徹底解決"The last packet successfully received from the server was * milliseconds ago"問題

1.修改mysql 的 wait_timeout引數(和interactive_timeout一起) 不推薦

2.如果用hibernate.必須手動配置連線池,最好是用c3p0連線池。如果不配,會使用內建連線池。內建連線池的8小時斷開問題不知道hibernate開發者怎麼還不解決!

3.乾脆不用hibernate,spring的jdbc template+自己配連線池就非常好。