Mysql disconnects

I’m using mysql to store history from my door and motion sensors.
Now I noticed that not all events are stored, some are but not all.
This is what I get in the logs when it doesn’t work:
2015-12-21 08:49:06.406 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Connection is not valid!
2015-12-21 08:49:06.406 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Connection is not valid!
2015-12-21 08:49:06.407 [ERROR] [.p.m.i.MysqlPersistenceService] - mySQL: Could not store item ‘fourin1_1_motion’ in database with statement ‘INSERT INTO Item2 (TIME, VALUE) VALUES(NOW(),?) ON DUPLICATE KEY UPDATE VALUE=?;’: No operations allowed after connection closed.

these are my config values:

the reconnection counter


the connection timeout (in seconds)


my addon:

Any suggestion for how to resolve this is appreciated.
Thanks in advance

Hi @TordYevl ,
Did you ever found a solution ?
I have the some issue.

no the problem went away without a verified solution.
I did a clean installation of openhab2, one thing is that I left the “waitTimeout” and “reconnectCnt” commented out.
I also fixed that my database was some kind of mix of MariaDB and MySQL.
So either of these could have done the trick.