-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Limit number of objects in mdag batch to prevent too many fds issue #3756
Conversation
merkledag/merkledag.go
Outdated
// By default, only batch up to 256 nodes at a time. | ||
// The current implementation of flatfs opens this many file | ||
// descriptors at the same time for the optimized batch write. | ||
MaxBlocks: 256, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reduce it even further. 256 blocks worst case scenario is 512 open fds (directory and file), and with almost 500 peers it is getting close to 1024 ulimit we set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm... fair enough. How about 200 even? I think we should rework how flatfs works/replace it soon.
…sues License: MIT Signed-off-by: Jeromy <[email protected]>
0438646
to
31af335
Compare
should resolve #3752 |
It doesn't fix everything, I am still getting this failure:
It is slightly modified test as previously the error was being hidden by var capture. |
Ok, now it vanished. |
In certain situations the 8MB size limit here would result in a large number of objects in the batch, which combined with peer connections, can easily hit the file descriptor limit.
License: MIT
Signed-off-by: Jeromy [email protected]