Skip to content
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

feat: raise soft fdlimit to max at runtime (os x/linux) #1338

Merged
merged 3 commits into from
Nov 3, 2020

Conversation

cryptonemo
Copy link
Collaborator

feat: add tool that shows max available open files

@cryptonemo
Copy link
Collaborator Author

cryptonemo commented Nov 2, 2020

I believe this is related to #1327. In that issue, an open file descriptor limit is hit write persisting the tree data in parallel batches (or at least that's the case that has been reproduced resulting in the same error reported). This PR does 2 things: 1) It logs what the max available fd limit is, which is commonly mis-configured on users' systems, and 2) It explicitly raises the fd descriptor limit from the soft limit to the max.

@@ -997,6 +997,9 @@ impl<'a, Tree: 'static + MerkleTreeTrait, G: 'static + Hasher> StackedDrg<'a, Tr
LabelsCache::<Tree>::new(&label_configs).context("failed to create labels cache")?;
let configs = split_config(tree_c_config.clone(), tree_count)?;

let res = fdlimit::raise_fd_limit().expect("Failed to raise the fd limit");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not panic, but simply print a warning

@cryptonemo cryptonemo merged commit 11f2341 into master Nov 3, 2020
@cryptonemo cryptonemo deleted the raise-fdlimit branch November 3, 2020 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants