-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Increase file descriptor limit in NativeAOT app process #82719
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsBoth CoreCLR and Mono call a function that will increase the maximum open file descriptors via a function like this, should NativeAOT do the same? runtime/src/coreclr/pal/src/init/pal.cpp Lines 1087 to 1093 in 2bdc3cb
/cc @dotnet/ilc-contrib
|
It probably makes sense, just for parity purposes. |
FWIW, this is disabled on Alpine and nobody ever complained about it there: runtime/src/coreclr/pal/src/CMakeLists.txt Lines 95 to 96 in e9b9489
|
I don't know about the historical context (the function was already part of the initial CoreCLR github commit) but we recently saw issues if this isn't done during NuGet restore: #82428 |
This was part of the original Rotor PAL: https://github.com/SSCLI/sscli_20021101/blob/77d46e0f04f52052a12ac40ce2cf96712c934b3c/pal/unix/init/pal.c#L629 . |
I remember there was a bug fix for when we could temporarily have too many fd's. I'll try finding details. |
At the time of Rotor using /dev/zero for anonymous memory mapping was likely the "right" way. |
Given we're seeing #82428 when the limit is not increased I think it still makes sense to have it, though you could argue that with NativeAOT in library mode maybe the embedding application should have the final say. |
The scenario with NuGet looks real. The app has a scenario that may open 1K+ files and gets away with that on CorCLR, making this a compat issue. I think we should increase the limit on NativeAOT and perhaps on Alpine too, unless the reason (debugging is broken) is still there. |
No compat concerns in this case. |
It seems reasonable to match the CoreCLR behavior here. |
Alpine does not automatically increase the file handle limit to the maximum. dotnet#82719 (comment) As a result we need to increase the limit manually, as we are seeing "Too many files" errors.
* Add file handle limit setting for Alpine Alpine does not automatically increase the file handle limit to the maximum. #82719 (comment) As a result we need to increase the limit manually, as we are seeing "Too many files" errors. * Bump limit to hard cap * Remove space
CoreCLR and soon Mono (after #82429) call a function that will increase the maximum open file descriptors via a function like this, should NativeAOT do the same?
runtime/src/coreclr/pal/src/init/pal.cpp
Lines 1087 to 1093 in 2bdc3cb
/cc @dotnet/ilc-contrib
The text was updated successfully, but these errors were encountered: