php-pm-httpkernel icon indicating copy to clipboard operation
php-pm-httpkernel copied to clipboard

Weird behaviour after doctrine-bundle update 2.0.6

Open acasademont opened this issue 5 years ago • 6 comments

Just to keep track of it, seems like the new doctrine-bundle default behaviour interferes with our clear or reset strategy we have in the Symfony bootstrap.

https://github.com/doctrine/DoctrineBundle/issues/1114

acasademont avatar Dec 23 '19 15:12 acasademont

That looks strange indeed. I'll try to have a look in the next few days, as this will probably affect my projects as well after upgrading. The PHP-PM code itself doesn't look wrong, it only resets if the entity manager is not open (e.g. an exception occurred that closed it), otherwise it only clears the existing one.

dnna avatar Dec 23 '19 16:12 dnna

Btw, if DoctrineBundle now performs its own reset we should probably remove our reset logic in PHP-PM's postHandle or make it conditional on Doctrine\Bundle\DoctrineBundle\Registry not having ResetInterface. Otherwise we are resetting twice now.

dnna avatar Dec 23 '19 16:12 dnna

yes, exactly, it's as easy as to check if the doctrine service is implementing the ResetInterface or not

acasademont avatar Dec 23 '19 17:12 acasademont

I'm having memory leaks after upgrading from doctrine-bundle 2.0.2 to 2.0.6. Workers reach max memory after 500 requests while the workers are only restarted after 1000 requests. I've downgraded it back to 2.0.2

mathieudz avatar Dec 24 '19 21:12 mathieudz

Interesting side effect, I didn’t even notice. I’m going to check our production logs. In any case, we too reverted to 2.0.2

On Tue, 24 Dec 2019 at 22:00, Mathieu De Zutter [email protected] wrote:

I'm having memory leaks after upgrading from doctrine-bundle 2.0.2 to 2.0.6. Workers reach max memory after 500 requests while the workers are only restarted after 1000 requests. I've downgraded it back to 2.0.2

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/php-pm/php-pm-httpkernel/issues/161?email_source=notifications&email_token=AAGJNPO2VVEMIX5LNGELZVTQ2JZ6PA5CNFSM4J6VOTZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHTTT5I#issuecomment-568801781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJNPMV5SVFXISPQDG744TQ2JZ6PANCNFSM4J6VOTZQ .

acasademont avatar Dec 25 '19 08:12 acasademont

@mathieudz didn't see any memory limit crashes on our logs. Still, we should also keep an eye on it.

acasademont avatar Dec 27 '19 10:12 acasademont