Description
If a script doesn't log anything for a time longer than the database server keeps an idle connection open the LoggerAppenderPDO throws an exception.
I have scripts running much longer than the default wait_timeout value defined in our MySQL server. This eventually causes the PDO appender to throw an exception (especially when running with a threshold of ERROR or above, which ideally hardly occurs) and renders it unusable for my application.
As a solution the PDO appender could either allow to define an initial statement that is executed right after the connection is opened. That could be used to increase the timeout time to whatever is needed. Or the appender detects that the connection has gone away, tries to re-establish it silently and only throws an exception if that attempt fails.