Correct way to keep pooled connections alive (or time them out and get fresh ones) during longer inactivity for MySQL, Grails 2 app

The easiest is to configure the connection pool to specify the query to be run to test the connection before it is passed to the application: validationQuery=”select 1 as dbcp_connection_test” testOnBorrow=true This same “connection validation” query can be run on other events. I’m not sure of the defaults for these: testOnReturn=true testWhileIdle=true There are also … Read more