What are the consequences of reopening closed entityManager? #10425
Unanswered
f1amy
asked this question in
Support Questions
Replies: 1 comment
-
You should try to figure out (I don’t know) what it means that an EM has been closed, and what the reasons were to design the API in a way that it cannot easily be reopened. Do yourself and future team mates a favor and try not to hack the EM as shown above. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm trying to deal with deadlocks and wait timeouts in a PHP consumer.
I Implemented retry functionality but getting
The EntityManager is closed.
exception on second try.We're using old Symfony and most of our services and repositories use
entityManager
directly (without proxy).So we can't use
resetManager()
method to replace closed entity manager with a new one everywhere at once.I come up with the following solution which seems to be working for us.
But what are the "unforeseen" consequences of doing so?
Beta Was this translation helpful? Give feedback.
All reactions