I am using hibernate with mysql database. But I am getting an exception "Communication link failure" every morning.
This could be due to idle connection whole night which MYSql closes in morning.
So what could be the best way to solve this problem. Should I increase wait_timeout or write a service which pings server every few hours? Please suggest.