-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrade from 2.5.7 to >= 2.6.0 it uses a lot of memory during tests #1525
Comments
Can you provide a reproducer that shows this increased memory usage? Did not notice anything strange on my apps. |
Did you upgrade only doctrine-bundle? Please make sure you only update bundle to isolate the problem. |
Yes, I did. I updated all packages to the newest ones and ran the tests. It turns out it uses a lot of memory. I started downgrading ONLY the doctrine/doctrine-bundle package and in version 2.5.7 it backed to normal. @dmaicher I will try to make some examples as I find some time. |
Closing here for now. Let me know if you can provide a reproducer @nightio then we can take a look and re-open if needed. |
I'm experiencing the same issues. I will also look for some clues, but letting you know it's not the single project problem. Edit: I found the issue, but it's only a side effect of change in this bundle. In 2.6.0 there was an introduction of Logger Middleware: #1429. This is fine, but it creates a bad synergy with Codeception framework plus Symfony module https://codeception.com/docs/modules/Symfony. In the module, doctrine service is persisted between tests which effectively freezes the dependencies for Doctrine, including logger which is passed to the Driver. Logger is not cleared between tests, which makes record being accumulated and eventually leads to memory overflow. |
@dmaicher I have prepared the repo with reproducing of this issue Note that the problem comes out with dama/doctrine-test-bundle in my case. |
Thanks for the nice reproducer @nightio. I will take a closer look. |
This is actually not an issue with DoctrineBundle. Its an issue with As a workaround you can disable DBAL logging in tests: when@test:
doctrine:
dbal:
logging: false I will create a new issue on |
After upgrading from 2.5.7 to >= 2.6.0 I noticed tests fail due to out of memory (standard 128M).
In the previous version my tests used up to ~100M of memory, meanwhile, after the upgrade it needs ~400M of memory.
After a downgrade to 2.5.7, it returned to normal.
I have tested all 2.6.x versions and the result is the same. So the problem raised in version 2.6.0
Temporary fix: lock version 2.5.7
composer require doctrine/doctrine-bundle:2.5.7
The text was updated successfully, but these errors were encountered: