I just updated my projects Flask-SQLAlchemy Version to the latest one (v2.4). As some of the SQL-Alchemy config parameters were deprecated, I now follow the documentation an
As you have already mentioned in the comment the problem was in the pool parameter.
SQLAlchemy documentation specifies that an instance of Pool
or QueuePool
could be a pool
parameter.
The valid example is:
SQLALCHEMY_ENGINE_OPTIONS = {
'pool': QueuePool(creator),
'pool_size': 10,
'pool_recycle': 120,
'pool_pre_ping': True
}