I
I
Ivan Yakushenko2020-09-03 11:52:45
linux
Ivan Yakushenko, 2020-09-03 11:52:45

Why is it not possible to change ulimit -n in WSL Ubuntu 20.04.1?

OS: Windows 10 2004 (19041)
WSL ver 2
Ubuntu 20.04.1 LTS It is
necessary to increase the number of open files, initially did it like this a few updates ago:
ulimit -n 65535
Now the answer to this operation is the following:

-bash: ulimit: open files: cannot modify limit: Operation not permitted

[email protected]:~$ prlimit -n
RESOURCE DESCRIPTION              SOFT HARD UNITS
NOFILE   max number of open files 1024 4096 files
[email protected]:~$ prlimit -n=65535
prlimit: failed to parse NOFILE limit

Tried editing config files:
# /etc/security/limits.conf

*       hard    nofile  65535
*       soft    nofile  65535
root    hard    nofile  65535
root    soft    nofile  65535

# /etc/sysctl.conf

fs.file-max = 65535

Rebooted, nothing changes. As I wrote - a few updates ago (Windows / WSL) everything worked, now it doesn't. What is broken and how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-09-03
@kshnkvn

there is a similar issue in the microsoft git https://github.com/Microsoft/WSL/issues/1688
there are ways to solve this problem down there. See if one of them suits you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question