Problems with mysql persistance, frequent connection failures

Iā€™m running openhab and mysql on a Pi2 and I am getting very frequent errors, along the lines of:

2017-01-14 09:49:03.111 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Connection is not valid!
2017-01-14 09:49:03.112 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Error count exceeded 1. Disconnecting database.
2017-01-14 09:49:14.149 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Connection is not valid!
2017-01-14 09:49:14.151 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Error count exceeded 1. Disconnecting database.
2017-01-14 09:49:24.202 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Connection is not valid!
2017-01-14 09:49:24.203 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Error count exceeded 1. Disconnecting database.

I am seeing data in the database that I can plot with the chart functionality.

I am seeing no errors from mysql. Any suggestions on troubleshooting this?

I foudn the problem, the timeout value was too low. I had misread it as being the timeout for a transaction instead of being an idle timeout (name change for openHAB2 please :slight_smile: