Skip to content

Use QueuePool as a default instead of SingletonThreadPool #96

Open
@gruberlu

Description

@gruberlu

The SingletonThreadPool should not be used as a default connection pool, as its recommended for testing purposes only by the SQLALchemy 1.4 Docs:

the SingletonThreadPool will call .close() on arbitrary connections that exist beyond the size setting of pool_size, e.g. if more unique thread identities than what pool_size states are used. This cleanup is non-deterministic and not sensitive to whether or not the connections linked to those thread identities are currently in use.
SingletonThreadPool may be improved in a future release, however in its current status it is generally used only for test scenarios using a SQLite :memory: database and is not recommended for production use.

The SingletonThreadPool can lead to unreliable connections, when being used in an asynchronous application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions