Skip to content

Commit 827a987

Browse files
authored
Reduce the soft file descriptor limit to 10240 (#12996)
1 parent a2aa0aa commit 827a987

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/linux/init/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,10 +1452,11 @@ Return Value:
14521452

14531453
//
14541454
// Increase the soft and hard limit for number of open file descriptors.
1455+
// N.B. the soft limit shouldn't be too high. See https://github.com/microsoft/WSL/issues/12985 .
14551456
//
14561457

14571458
rlimit Limit{};
1458-
Limit.rlim_cur = 1024 * 1024;
1459+
Limit.rlim_cur = 1024 * 10;
14591460
Limit.rlim_max = 1024 * 1024;
14601461
if (setrlimit(RLIMIT_NOFILE, &Limit) < 0)
14611462
{

0 commit comments

Comments
 (0)