-
Notifications
You must be signed in to change notification settings - Fork 821
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
Can't raise "open files" ulimit #1688
Comments
There was an accidental regression where the RLIMIT_NOFILE checks were too strict, and that was fixed in early February. The fix should be out for insider builds soon though the rlimits are still not actually applied. |
Bumping this, it makes Ubuntu on windows unusable for professional developer use with node and as a consequence with pretty much anything that uses node to comple large numbers of assets. Can we get a little attention, or at least have this scheduled? Thanks. |
Any chance this'll be fixed soon? |
@atomicthumbs - taking a look at this now. |
Support was added in 16257. |
@benhillis I have updated to the build of 16257, the "ulimit -n" can be changed. However, as an atmospheric scientist, i want to know that if the "ulimit -s" to be changed to unlimited, as we want to use the wsl on the workstation. Now the stack size is static 8192K, too limited for modeling. |
@leixuezhang - Currently changing the stack size is not supported, this is also requested in #633, and on User Voice. |
Ubuntu (well, Linux kernel) defaults were fantastic for those running Gnome on their desktop in early 2000s. Many developers, regardless of the tools they use, have to bump the limit significantly (say, at least 20K) at some point. The number of threads on the Web about Please consider increasing the default to 20K: the downside is a tiny increase in the amount of RAM used, absolutely negligible in the year of 2017. |
#633 for more. |
I get only one chance to increase the limit ?
|
This issue is stil exists even with WSL 2 |
This issue does not (ulimit works fine). But you are probably hitting variation this. We got no PAM. |
I tried of course "session required pam_limits.so", but it did not help. This issue is still exists. |
I was running into this error with WSL2 also. After changing everything outlined through this issue the limits for ulimit wouldn't be raised and wouldn't let me modify the values past the limits, but when checking the rights for the user I was running my command as: |
I too am having this issue with ulimit in WSL 2... and vm.max_map_count isn't available in WSL 1, so it makes running Elasticsearch pretty much impossible in ANY WSL distro :( |
Today, with the lates WSL2 - ubuntu, I can not change ulimit -n for common user. |
Same issue here in WSL2. Trying to change nofile limit in /etc/security/limits.conf, but it does not take effect. |
I edited |
@BerserkerGaruk's workaround does indeed resolve this! |
I'm running into this now ad @BerserkerGaruk workaround doesn't work for me. Any suggestions? |
you can add at the end of your .profile: exec sudo su user --shell /bin/bash (replace user with your own user account) don't forget to add user to sudo with no password using visudo by adding at the end: user ALL=(ALL) NOPASSWD:ALL you will also need to edit /etc/security/limits/conf and add: user soft nproc 16384 then after you start wsl you should get: user@windows10-g56jr:~$ ulimit -n |
It's crazy that this is somehow marked closed and fixed. The sudo su workaround works for me, but that really shouldn't be necessary. Needing to disable sudo passwords is a security risk. |
It actually does not even work, as doing |
Workaround not working for me on wsl 2. @benhillis can you please reopen this? Makes using wsl as an alternative to osx impossible for node developers. Downgrading to wsl 1 in the meantime. |
The tips in this issue didn't work for me with WSL2, but I found a potential workaround here: #1576 (comment) Basically:
More explanation on the link |
another option is |
@benhillis @therealkenc could you re-open this? |
I'm running into the same issue on WSL2 with Ubuntu. The workaround from @FFdhorkin worked, but it's still annoying, because after using |
I ended up making root the default user for wsl and everything works. |
This issue is still present on WSL 2, could you reopen it? |
#4575. Discussion on |
Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!
The "open files" ulimit can't currently be increased.
I know of two use cases for setting this ulimit:
NodeJS (and therefore lots of common NodeJS tools -- npm, grunt, etc) has a common design idiom of "process all of these files", whose default implementation is to open all of the files asynchronously and process them as the OS gets around to reading them. "All of the files" can be quite a lot :-) So NodeJS users often have to either bump this limit, or modify their own tools to use graceful-js. Modifying existing tools can be hard, so simply bumping the limit is sometimes the preferred workaround. (I think this is the real issue behind Defult ulimit way too low #1679 )
Some databases (I personally know that Vertica does this; I think I recall hearing that MySQL can do the same?) can, in certain situations, open very large numbers of file descriptors. The objective is typically to have some clever effect on query performance. Decreasing the number of available file descriptors sacrifices query performance and/or causes errors.
Expected results
And the actual limit is updated
15031
See above
If you really want an strace of
bash -c 'ulimit -n 65536'
, I can post one. It's going to be long, though, and I bet y'all already know what the important part is :-)None -- bash builtin.
See our contributing instructions for assistance.
The text was updated successfully, but these errors were encountered: