-
Notifications
You must be signed in to change notification settings - Fork 1.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
Too many open files under RustBoard (EMFILE) #4955
Comments
Hi @Raphtor! Thanks for the report and the helpful info. Some questions:
|
Thanks for your quick response! Here are the things you requested.
|
An easy workaround here would be to just increase the fd cap to the hard At a glance, pulling in the fn increase_fd_limit() -> std::io::Result<()> {
#[cfg(unix)]
{
use rlimit::Resource;
let (old_soft_limit, hard_limit) = Resource::NOFILE.get()?;
Resource::NOFILE.set(hard_limit, hard_limit)?;
debug!("Changed file descriptor limit from {} to {}", old_soft_limit, hard_limit);
}
#[cfg(not(unix))]
{
debug!("Non-Unix; leaving file descriptor limit alone");
}
Ok(())
}
fn try_increase_fd_limit() {
if let Err(e) = increase_fd_limit() {
warn!("Failed to increase file descriptor limit: {}", e);
}
} to |
I've also run into this problem after an upgrade. I have 10s of thousands of runs however... |
I've also encountered the problem and found that raising the "open files" limit by executing e.g.
solves the problem for me (without requiring superuser permissions). |
fyi |
I am getting a lot of warnings about too many open files -- is there a way to reduce or cap the number of open file descriptors?
2021-05-11T14:31:46Z WARN rustboard_core::run] Failed to open event file EventFileBuf("[RUN NAME]"): Os { code: 24, kind: Other, message: "Too many open files" }
I don't have that many runs (~2000), so it shouldn't really be an issue. Using lsof to count the number of open FDs shows over 12k being used...
Compared to <500 in "slow" mode.
In my case, the "slow" mode actually loads files faster since it doesn't run into this issue.
Originally posted by @Raphtor in #4784 (comment)
The text was updated successfully, but these errors were encountered: