PDO workaround for DB resource loss after connecting to a remote DB