python – Where is pool SQLAlchemy physically located?


By searching, I came across the fact that SQLAlchemy has a thread pool: It is configured simply by specifying parameters in create_engine.

My question is, where is this pool physically stored? Does each running python process (as I understand it in each wsgi) have its own pool? Or is it somehow different? How does it work in python?


No streams, connections to the base. Yes, each process has its own pool. This is a regular callable that returns a connection from a collection it manages. That is, in the extremely simple case, it can be just a function that returns a new connection. Real pools are classes that store collections of free and issued connections inside themselves, keep statistics on the lifetime of connections, check their activity, close and open them if necessary.

Scroll to Top