Search stumbled upon the fact that SQLAlchemy has a thread pool: http://docs.sqlalchemy.org/en/latest/core/pooling.html It is configured simply by specifying parameters in create_engine.

I have a question, where is this pool physically stored? In every running python process (as I understand it in every wsgi), is your pool? Or something different? How is it arranged in python?

    1 answer 1

    No thread connections to the base. Yes, each process has its own pool. This is the usual callable returning connection from the collection it manages. That is, in the simplest case, it may just be a function that returns a new connection. Real pools are classes that store collections of free and issued connections within themselves, leading statistics on the lifetime of connections, checking their activity, closing and opening them when necessary.