Skip to content
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

Too many open files #226

Closed
driskell opened this issue Jun 15, 2020 · 3 comments · Fixed by #231
Closed

Too many open files #226

driskell opened this issue Jun 15, 2020 · 3 comments · Fixed by #231

Comments

@driskell
Copy link
Contributor

On a very large Magento 2 setup we're seeing for fresh installs the following error when running composer install. With prestissimo removed it works fine.

  [ErrorException]
  fopen(/Users/jason.woods/.composer/cache/files/magento/module-currency-symbol/a88dd237717157a05217e9aec03be4a1eceb0c65.zip): failed to
  open stream: Too many open files

We tracked it down to this line:
https://github.com/hirak/prestissimo/blob/master/src/CopyRequest.php#L91

The file is opened during the building of the requests. This means when you've got thousands of packages to download it can hit the file limit even though it's only going to proceed with 10/100 requests at a time.

I guess the best fix is that FP is opened on first call to getCurlOptions instead?

@vesper8
Copy link

vesper8 commented Jul 22, 2020

you can also just run this on your CLI first and then it works ulimit -n 10000

@driskell
Copy link
Contributor Author

Thanks. Would be great to fix the issue though. It’s on my list to look at and PR but would be great to get some contributor hints if any pass by.

@driskell
Copy link
Contributor Author

driskell commented Sep 8, 2020

I raised a PR that works. It removes need to mess with ulimit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants