celery / kombu

Messaging library for Python.
http://kombu.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
2.91k stars 929 forks source link

Kombu does correct support multi-threading sqla broker #1395

Open CrazyLionHeart opened 3 years ago

CrazyLionHeart commented 3 years ago

In case running Celery with sqla+postgresql+psycopg2 broker with prefork model I facing with problem - all broker connection is died.

In logs we found error - This session in "prepared" state; no further SQL can be emmited within this transaction.

Short research show sqla broker does not use thread-local session object - https://docs.sqlalchemy.org/en/14/orm/contextual.html

open-collective-bot[bot] commented 3 years ago

Hey @CrazyLionHeart :wave:, Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us - every little helps!

We also offer priority support for our sponsors. If you require immediate assistance please consider sponsoring us.

auvipy commented 3 years ago

yeah the broker still need work on SQLA 1.4 release. we just added basic compatibility