Subject: | Does not deal with handle timeout gracefully |
I noticed this problem when I leave my dev server running overnight and
try to use it the next morning. The database handle is disconnected
because it timed out (I assume), and I get this error - "DBD::mysql::st
execute failed: MySQL server has gone away at
/usr/local/share/perl/5.8.8/Catalyst/Plugin/Session/Store/DBI.pm line 30."
The problem is that the code is creating a bunch of statement handles
once and then using them forever, but it doesn't try to ensure that the
underlying database handle is still active.
It might make sense to add a ping() call in _session_sth() and delete
all the statement handles if that fails.