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

Resource manager's InfiniteLimits are not infinite #1721

Closed
SaveTheRbtz opened this issue Aug 26, 2022 · 2 comments · Fixed by #1722
Closed

Resource manager's InfiniteLimits are not infinite #1721

SaveTheRbtz opened this issue Aug 26, 2022 · 2 comments · Fixed by #1722
Assignees

Comments

@SaveTheRbtz
Copy link

cc: @MarcoPolo

When using Resource manager with InfiniteLimits via:

rcmgr.NewResourceManager(rcmgr.NewFixedLimiter(rcmgr.InfiniteLimits))

We still seeing connections failing with ErrResourceLimitExceeded, likely due to the numeric overflow in checkMemory

PS. While here it would be nice to have unittest for the InfiniteLimits.

@MarcoPolo
Copy link
Collaborator

Thanks for debugging this! I'm pretty sure the culprit is here: https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/scope.go#L87

PS. While here it would be nice to have unittest for the InfiniteLimits.

Agreed, want to take a stab at it?

@SaveTheRbtz
Copy link
Author

Fair enough! I'm not the best coder but I'll try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants