[Bug] Too many open files with pnp linker
See original GitHub issue- I’d be willing to implement a fix
Describe the bug
When I run 2 webpack’s builds in parallel on the kinda large repo (it’s hard to say about size when there is nothing to compare) I’m getting system error too many open files
. After switching to node-modules
linker all works fine.
Error looks like this:
thread 'thread '<unnamed>' panicked at '<unnamed>failed to open /dev/urandom: Os { code: 23, kind: Other, message: "Too many open files in system" }' panicked at '', failed to open /dev/urandom: Os { code: 23, kind: Other, message: "Too many open files in system" }', src/libstd/sys/unix/rand.rssrc/libstd/sys/unix/rand.rs::9090::2424
To Reproduce
It’s hard to make a repro because I’m facing it with my private company project. But maybe you have some thought how to debug it or reasons why it happens.
Environment if relevant (please complete the following information):
- OS: MacOS Catalina 10.15.6 Beta (19G46c)
- Node 14.0.0
- Yarn version 2.1.1
- Webpack 4
Additional context
Also I’m getting a lot of error about peer dependencies, but not sure that it’s related:
(node:2546) [MODULE_NOT_FOUND] Error: react-dev-utils tried to access @babel/core, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
There is the workaround for this behavior but I feel weird about it because it’s not really good DX especially in large teams https://medium.com/mindful-technology/too-many-open-files-limit-ulimit-on-mac-os-x-add0f1bfddde
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
There is also https://github.com/webpack/watchpack/issues/142 which looks into the same issue
Closing as this seems to be fixed in webpack, if not let us know and we can reopen