upped the number of file handles for madmax (#13856)

* upped the number of file handles. this won't affect the hard limit but only soft limits set previously

* Set soft limit to max (hard limit)
This commit is contained in:
wjblanke 2022-11-09 01:31:51 -08:00 committed by GitHub
parent 962ad8abeb
commit 5c38a39077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,9 @@ def plot_madmax(args, chia_root_path: Path, plotters_root_path: Path):
# madMAx has a ulimit -n requirement > 296:
# "Cannot open at least 296 files, please raise maximum open file limit in OS."
resource.setrlimit(resource.RLIMIT_NOFILE, (512, 512))
soft_limit, hard_limit = resource.getrlimit(resource.RLIMIT_NOFILE)
# Set soft limit to max (hard limit)
resource.setrlimit(resource.RLIMIT_NOFILE, (hard_limit, hard_limit))
else:
reset_loop_policy_for_windows()