Thanks!
By the way, I forgot to document the solution for the thread "Python + Flask - 500 Internal Server Error." The issue was resolved with this SQLAlchemy configuration:
SQLALCHEMY_ENGINE_OPTIONS = {'pool_size': 5, 'max_overflow': 5, 'pool_timeout': 30, 'pool_recycle': 280, 'connect_args': {'connect_timeout': 30}}