OrmLite mysql and timeouts

We have a long running service that uses servicestack and ormlite with mysql. We are experience timeouts after leaving the service running overnight. I’m not sure if this is an ORMlite issue or a MySQL issue.

We have attempted setting a keepalive in the mysql connection string, but that did not work.
We see that the default system idletimeout is 8 hours or 28800 sec.

http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_wait_timeout

We could set that timeout longer, but would rather have a more proactive approach.

Is there a variable to check on the IDBConnection?

Whats the best way to manage this.

Thanks

In OrmLite you can set OrmLiteConfig.CommandTimeout (in seconds) which will populate ADO.NET’s IDbCommand CommandTimeout property.