79761480

Date: 2025-09-11 04:47:15
Score: 1.5
Natty:
Report link

I know this is an older topic, but for anyone else who stumbles across this:
The current supported way to do this is using the "SQLALCHEMY_ENGINE_OPTIONS" config flag for Flask-SQLAlchemy

For example, to set the pool configuration in the original question, you would add the following to your config file:

SQLALCHEMY_ENGINE_OPTIONS = {'pool_size': 20, 'max_overflow':0}

Source: https://flask-sqlalchemy.readthedocs.io/en/stable/config/#flask_sqlalchemy.config.SQLALCHEMY_ENGINE_OPTIONS

See also https://docs.sqlalchemy.org/en/20/core/pooling.html (or for SQLAlchemy 1.4, https://docs.sqlalchemy.org/en/14/core/pooling.html)

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Alex V