Open file descriptor limits: is there a usable solution? #6400
Replies: 3 comments 2 replies
-
Bump! Increasing |
Beta Was this translation helpful? Give feedback.
-
@Delicious-Bacon and (if you're still around) @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 argument Simply placing the Proper
|
Beta Was this translation helpful? Give feedback.
-
I had issues with raising the limit aswell, found a solution that worked for me. See my reply here: #9213 (comment) |
Beta Was this translation helpful? Give feedback.
-
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 zsh
every 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
Beta Was this translation helpful? Give feedback.
All reactions