Skip to content

Управление транзакциями: явный commit/rollback #254

Description

@petrCher

connection закрывать с помощью rollback или commit и не обращаться к бд (ОРМ) после этого
Делать только в нагруженных местах, везде не надо
Пример от Тимура: https://github.com/Western-CSUS-2025-2026/CSUS-Project-25-26/blob/0d555aaf4c864d1c955b98784d9ddd41f4720d30/interviewer_backend/api/routes/user.py#L324https://github.com/Western-CSUS-2025-2026/CSUS-Project-25-26/blob/0d555aaf4c864d1c955b98784d9ddd41f4720d30/interviewer_backend/api/routes/user.py#L324

Проблема сейчас с возможным превышение лимита подключений к бд в высоконагруженных местах, подробнее https://docs.sqlalchemy.org/en/21/errors.html#connections-and-transactions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions