curved-microphone-39455
12/19/2022, 4:00 PMulimit
with WSL2
I can't make it work correctly on Windows, every time I get, I also tried to modify different files following many tutorial, I still have the warning at the beginning...
ulimit -n 65536
-bash: ulimit: open files: cannot modify limit: Operation not permitted
enough-analyst-54434
12/19/2022, 4:04 PMcurved-microphone-39455
12/19/2022, 4:05 PMenough-analyst-54434
12/19/2022, 4:05 PMenough-analyst-54434
12/19/2022, 4:08 PMenough-analyst-54434
12/19/2022, 4:09 PM$ ulimit -n
1024
curved-microphone-39455
12/19/2022, 4:10 PMulimit
command like describe above,
I have tried to add my user to /etc/security/limits.conf
but without luck (still at 1024) and also tried
sudo prlimit -p "$$" --nofile=10000:10000
exec zsh
ulimit -n 10000
which work but only for the running sessioncurved-microphone-39455
12/19/2022, 4:11 PMenough-analyst-54434
12/19/2022, 4:18 PM$ whoami
jsirois
$ tail -5 /etc/security/limits.conf
#@student - maxlogins 4
# End of file
jsirois hard nofile 65536
Then over in powershell:
> wsl -t Ubuntu-22.04
The operation completed successfully.
Then opened a new Ubuntu-22.04 session:
$ ulimit -n
1024
$ ulimit -n 65536
$ ulimit -n
65536
$ ulimit -n 65537
-bash: ulimit: open files: cannot modify limit: Operation not permitted
enough-analyst-54434
12/19/2022, 4:19 PMcurved-microphone-39455
12/19/2022, 4:45 PMulimit -n 65536
but I still have this warning 11:44:23.78 [WARN] File handle limit is capped to: 4096. To avoid 'too many open file handle' errors, we recommend a limit of at least 10000: please see <https://www.pantsbuild.org/docs/troubleshooting#too-many-open-files-error> for more information.
when running Pantsenough-analyst-54434
12/19/2022, 4:49 PMpkill pantsd
or however you ensure Pantsd is down and then re-started it afresh after you bumped to 65K?curved-microphone-39455
12/19/2022, 6:16 PMulimit -n 65536
with my user (I was typing ulimit 65536
without the -n
) so no, even with the edit of my /etc/security/limits.conf
I can't modify (restarted WSL, restarted my pc, wipe all pants cache just to be sure)curved-microphone-39455
12/19/2022, 6:16 PMcerberus@LAPTOP-BASTIEN:/mnt/c/projects/pant$ tail -5 /etc/security/limits.conf
#ftp hard nproc 0
#ftp - chroot /ftp
#@student - maxlogins 4
# End of file
cerberus hard nofile 65536
cerberus@LAPTOP-BASTIEN:/mnt/c/projects/pant$ ulimit -n 65536
bash: ulimit: open files: cannot modify limit: Operation not permitted
enough-analyst-54434
12/19/2022, 6:16 PMenough-analyst-54434
12/19/2022, 6:17 PMps -ef | grep systemd
?curved-microphone-39455
12/19/2022, 6:17 PMcurved-microphone-39455
12/19/2022, 6:18 PMps -ef | grep systemd
cerberus 1295 1286 0 13:17 pts/0 00:00:00 grep --color=auto systemd
enough-analyst-54434
12/19/2022, 6:18 PMenough-analyst-54434
12/19/2022, 6:19 PM$ id
uid=1000(jsirois) gid=1000(jsirois) groups=1000(jsirois),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),119(lxd),121(wireshark),999(docker)
Are you in adm? I did not set that up explicitly for my user, but may be relevant.curved-microphone-39455
12/19/2022, 6:20 PMid
uid=1000(cerberus) gid=1000(cerberus) groups=1000(cerberus),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),117(netdev),1001(docker)
enough-analyst-54434
12/19/2022, 6:21 PMenough-analyst-54434
12/19/2022, 6:22 PMcurved-microphone-39455
12/19/2022, 6:22 PMenough-analyst-54434
12/19/2022, 6:22 PMenough-analyst-54434
12/19/2022, 6:23 PMcurved-microphone-39455
12/19/2022, 6:23 PMenough-analyst-54434
12/19/2022, 6:23 PMcurved-microphone-39455
12/19/2022, 6:23 PMcurved-microphone-39455
12/19/2022, 6:24 PMenough-analyst-54434
12/19/2022, 6:26 PMwhich bash
? Because, very weird to me but:
jsirois@Gill-Windows:~/dev/pantsbuild/jsirois-scie-pants (one_step_setup/parity) $ which bash
/usr/bin/bash
jsirois@Gill-Windows:~/dev/pantsbuild/jsirois-scie-pants (one_step_setup/parity) $ /mnt/c/Program\ Files/Git/bin/bash.exe
John Sirois@Gill-Windows MINGW64 //wsl.localhost/Ubuntu-22.04/home/jsirois/dev/pantsbuild/jsirois-scie-pants
$
IOW the Git bash.exe Windows executable works under WSL. I don't really understand WSL.
And Git bash fails:
John Sirois@Gill-Windows MINGW64 //wsl.localhost/Ubuntu-22.04/home/jsirois/dev/pantsbuild/jsirois-scie-pants
$ ulimit -n
3200
John Sirois@Gill-Windows MINGW64 //wsl.localhost/Ubuntu-22.04/home/jsirois/dev/pantsbuild/jsirois-scie-pants
$ ulimit -n 10000
bash: ulimit: open files: cannot modify limit: Too many open files
John Sirois@Gill-Windows MINGW64 //wsl.localhost/Ubuntu-22.04/home/jsirois/dev/pantsbuild/jsirois-scie-pants
$
curved-microphone-39455
12/19/2022, 6:28 PMubuntu run bash
and I get /usr/bin/bash
on the which bash
enough-analyst-54434
12/19/2022, 6:31 PM