Use db.ping to keep connection alive