By default, SQLAlchemy keeps the Engine's pooled connections open forever (`pool_recycle=-1`). This is a problem in MySQL because of a config value called `wait_timeout`, which sets the MySQL server to kill idle connections after 8 hours. Therefore, it was possible for code to check out a connection from SQLAlchemy (via `self.connect()` on one of the storages) where the underlying DB connection had been removed. To rectify this, I am setting the pooled connections to recycle after 1 hour.