Reduce the soft file descriptor limit to 10240 (#12996)

Blue committed May 30, 2025 at 11:33 UTC 827a987fc21df5882b48be65d4d4510e0fc30878
1 file changed +2 -1
src/linux/init/main.cpp
+2 -1
@@ -1452,10 +1452,11 @@ Return Value:
1452
1453 //
1454 // 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 .
1456 //
1457
1458 rlimit Limit{};
1458 - Limit.rlim_cur = 1024 * 1024;
1459 + Limit.rlim_cur = 1024 * 10;
1460 Limit.rlim_max = 1024 * 1024;
1461 if (setrlimit(RLIMIT_NOFILE, &Limit) < 0)
1462 {