-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Question: rcmgr limit conflicts with connmgr limit #2628
Comments
Facing the same issue. |
This means that you have configured the connection manager in such a way that it will never be used. Libp2p uses two modules for connection managements. Resource manager limit(rcmgr) is a hard limit. If the rcmgr limit is set to 1 you will only have 1 open connection. The ConnMgr limit is a soft limit of sort. It allows for a burst of connections between ConnMgr.LowWaterMark and ConnMgr.HighWaterMark. This allows for a burst of connections between Low and high watermark. But when you exceed the high watermark, the system trims connections down to low watermark. In your case HighWatermark trimming never happens because it's higher than the rcmgr limit. Ideally your high watermark limit should be a bit less than the rcmgr connections limit. |
I have the same issue, even if I set unlimited resources, it still complains about the system limit being 1
|
@juligasa I fixed that by using |
Oh, I just followed the package recommendations at |
I'm confused on why I'm getting that warning even tho I have not configured any custom connection manager, but using the defaults provided by go-libp2p as seen on the example code i wrote here: #2628 (comment) . Shouldnt go-libp2p by default configure the connection manager with settings that avoid this warning being emitted? |
@juligasa you need to set the
I agree. I'll check how to improve the situation here. |
I see, I thought the System level was the top abstraction scope, though. And by setting it to
I guess the |
This constraint is the other way round, no?
If the system scope is 1 connection, peer scope cannot be 10 connections On the other hand If the system scope is 100 connections, peer scope can be 1 connection |
Sure you're right. The problem is with default peer scopes though. I did not expect them to be so tight by default (actually, allowing only 1 connection is pretty tight). Will set limits accordingly, thanks! |
You're right, @juligasa . This warning doesn't make sense. The system connection limit is what we should check. I've raised a PR to fix this. Just to be clear: You DO NOT NEED to increase Conn Scope limit as I suggested here. I'm sorry about that. #2628 (comment) |
Ok, Makes sense |
While running this example code with
GOLOG_LOG_LEVEL=WARN go run main.go
, I always see this warning being printed:What does this warning mean? I tried to follow go-libp2p code for the resource manager and connection manager to find out but had some trouble understanding it. Is there something I should change to avoid having this warning?
Thank you in advance.
The text was updated successfully, but these errors were encountered: