-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
BUG Upgrade Sf 2.5 too many open files running tests #11566
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
Comments
Disable the logging on test with: # No logging on test environment
monolog:
handlers:
main:
type: test Solve it, but some code changed and this ticket should be followed |
I'm having the same issue since I've updated from 2.3.19 to 2.3.20. |
I've just fixed the bug for me. It's indeed some server configuration. Usually on Unix you have limits on how many files can be opened at the same time. You can check the limit using You can set it (temporarily) using A wild guess, with 2.3.20 (and upper) SF2 must have passed that limit for some classes that are listed (opended by the autoloader?) at the same time. |
Disabling logging on tests didn't solved? You didn't fix the bug you just increase your limit of files, the bug continues there, like I showed before Symfony code keeping opening the file without closing. For now IMO not having logging on test environment is the best approach. If this happens in production this is really bad. |
I did not tried, and I'm not sure having no logs in test is something I want. Imo disabling logs is also a workaround... Ideally, if it's some common issue, we could even add a check to |
I am kinda happy to see that I am not the only one, who gets this error. We are a team of four. 3 Nginx, 1 Apache. 2 of the Nginx get this "Too many open files"-error. Both run Arch Linux, the latest PHP and Symfony 2.6.*.
The only "workaround" I found so far: restarting php-fpm after the error occurs. This buys me about 2 hours on a normal day. Havn't tried disabling logging, I'll give that a go. But that should not be the solution. Edit: ... or sometimes only 10 Minutes. I'm not testing, running in normal development mode. |
@spezifanta in your case, it's php that hit the open files limit, so setting things at the webserver level is useless while using php-fpm. Maybe you should try to start php-fpm with a higher open |
We are still having this problem. |
@spezifanta would you mind to check if the issue persists with xdebug disabled? |
@jakzal I am having the issue only with xdebug remote enabled. Do you know the background behind this? I have not found much online. |
See http://bugs.xdebug.org/view.php?id=1070. Seems to be related to XDebug+PHPStorm. |
Perfect! Thank you. |
So this bug is related to xDebug? In that case, save to close? |
…rekas) This PR was merged into the 2.7 branch. Discussion ---------- [PhpUnitBridge] Re-enable the garbage collector | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17268, #11566 | License | MIT | Doc PR | - The bug is fixed in PHP and disabling the gc causes issues elsewhere. Commits ------- 478710f [PhpUnitBridge] Re-enable the garbage collector
A lot of files of test.log appear:
And they grow over and over to > 200
If I downgrade to Sf 2.4 is stable on 2/3 files without any change on the code.
The text was updated successfully, but these errors were encountered: