I'm connecting to a MariaDB database. The app running in Tomcat that uses the database is now setting "testWhileIdle" and "testOnReturn" to true, because the connections seem to time out after a while of being idle. Those appear to mitigate the problem in the app itself.
In SQuirreL, if I leave a connection open for a while, I get similar errors like:
----------
Error: (conn:121) Could not read packet: unexpected end of stream, read 0 bytes from 4
---------
It's not clear to me how to configure the connection automatically to mitigate these problems.
What's even worse is that when I try to "Reconnect", it just fails with "Error: (conn:121) Connection is close". I actually have to completely close the connection and reopen it, and then it works until I go idle again.
What can I do to mitigate these problems in SQuirreL?
|