SQLAlchemy connection pooling offers a recycle option which (if I\'m reading the docs right) will invalidate connections after they have reached a certain total age.
MySQ