Open file descriptor limits: is there a usable solution? #6400
Replies: 3 comments 2 replies
|
Bump! Increasing |
|
Delicious-Bacon and (if you're still around) Michael P. Lang (@michael-p-lang) It's possible there's some confusion on those issues that were linked -- They were both WSL1 specific issues. The situation on WSL2 is much, much better. Short answer: In WSL2 you should only need to add More Details: Look, there seems to be a lot of confusion out there in general around the open-files limit on Linux, so there's no surprise that the situation on WSL is even less clear. There are (at least) three limits in place regarding number of open files. To start with, on Linux:
There's probably a Windows limit in place as well to which WSL2 is subject, and perhaps one defined by Hyper-V. I can't speak to those numbers. On Linux, and in WSL2, you will typically be constrained by the soft limit. My guess is that this is what you are trying to change. As mentioned above, as a end-user, you can do so with a simple $ ulimit -Sn
1024
$ ulimit -Hn
1048576
$ ulimit -Sn 2048
$ ulimit -Sn
2048
$ ulimit -Hn 4096
$ ulimit -Hn
4096
$ ulimit -Hn 8192
-bash: ulimit: open files: cannot modify limit: Operation not permitted
$ ulimit -Sn 8192
-bash: ulimit: open files: cannot modify limit: Invalid argumentSimply placing the Proper
|
|
I had issues with raising the limit aswell, found a solution that worked for me. See my reply here: #9213 (comment) |
Uh oh!
There was an error while loading. Please reload this page.
I've done a lot of searching, and I can't find a real solution to the old ulimit problem. The leading contender for a solution is #1576 (comment) except I have to manually do
exec zshevery time. It would be nice if there was a permanent or otherwise hands-off solution to this problem.I'm running Ubuntu-20.04 in WSL2
Windows Version 20H2 Build 19042.685
All reactions