I have a small grails application running on Tomcat in Ubuntu on a VPS. I use MySql as my datastore and everything works fine unless I leave the application for more than ha
What does your JDBC connection string look like? You can set an autoReconneect param in your data source config, e.g.
autoReconneect
jdbc:mysql://hostname/mydb?autoReconnect=true