Under long-running apps (ReactPHP etc.) the connection may eventually break or time out. This article (and comment section) has some ideas on how to approach this: http://brady.lucidgene.com/articles/pdo-lost-mysql-connection-error