Doctrine The Entity Manager is closed #1757
Unanswered
ThomasLabstep
asked this question in
Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
So we have this SQS worker in bref that is processing a lot of data.
And sometimes, as we inject tons of data, we do get a few SQL deadlocks.
So far so good, we just retry by replaying the message again.
The issue is that as long as the lambda container is the same, no message handler will ever work again because the doctrine entity manager is closed. And that's not something easy to fix. We would need to add a wrapper to restart the entity manager if closed and that's annoying.
Something like that: https://kisztof.medium.com/how-to-deal-with-a-closed-entity-manager-in-doctrine-ac3a2c1d74a1
But because we're in the lambda world, it's way easier and cheaper to just ensure the lambda container is killed entirely if any exception happens.
I really need a way to kill the lambda container.
Is there a clean way to do that?
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions