Skip to content

Commit 3c374e5

Browse files
committed
Update resource manager docs
Being more clear that the "remote" string means its from a remote peer. This came up in: #9432 (comment) #9432 (comment) #9432 (comment)
1 parent ed4d6b7 commit 3c374e5

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

docs/libp2p-resource-management.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,26 @@ Good places to start are:
1212
3. Understand [how to inspect and change limits](#user-supplied-override-limits)
1313

1414
## Table of Contents
15+
<!-- TOC depthfrom:2 -->
1516

16-
- [libp2p Network Resource Manager <small>(`Swarm.ResourceMgr`)</small>](#libp2p-network-resource-manager-smallswarmresourcemgrsmall)
17-
- [Purpose](#purpose)
18-
- [Levels of Configuration](#levels-of-configuration)
17+
- [Purpose](#purpose)
18+
- [🙋 Help! The resource manager is protecting my node but I want to understand more](#-help--the-resource-manager-is-protecting-my-node-but-i-want-to-understand-more)
19+
- [Table of Contents](#table-of-contents)
20+
- [Levels of Configuration](#levels-of-configuration)
1921
- [Approach](#approach)
2022
- [Computed Default Limits](#computed-default-limits)
2123
- [User Supplied Override Limits](#user-supplied-override-limits)
2224
- [Infinite limits](#infinite-limits)
23-
- [FAQ](#faq)
25+
- [FAQ](#faq)
2426
- [What do these "Protected from exceeding resource limits" log messages mean?](#what-do-these-protected-from-exceeding-resource-limits-log-messages-mean)
25-
- [What are the "Application error ... cannot reserve ..." messages?](#what-are-the-application-error--cannot-reserve--messages)
26-
- [How does the resource manager (ResourceMgr) relate to the connection manager (ConnMgr)?](#how-does-the-resource-manager-resourcemgr-relate-to-the-connection-manager-connmgr)
27+
- [What are the "Application error 0x0 remote ... cannot reserve ..." messages?](#what-are-the-application-error-0x0-remote--cannot-reserve--messages)
28+
- [How does the resource manager ResourceMgr relate to the connection manager ConnMgr?](#how-does-the-resource-manager-resourcemgr-relate-to-the-connection-manager-connmgr)
2729
- [How does one see the Active Limits?](#how-does-one-see-the-active-limits)
2830
- [How does one see the Computed Default Limits?](#how-does-one-see-the-computed-default-limits)
2931
- [How does one monitor libp2p resource usage?](#how-does-one-monitor-libp2p-resource-usage)
30-
- [History](#history)
32+
- [History](#history)
33+
34+
<!-- /TOC -->
3135

3236
## Levels of Configuration
3337

@@ -128,15 +132,15 @@ Sources:
128132
* [kubo resource manager logging](https://github.com/ipfs/kubo/blob/master/core/node/libp2p/rcmgr_logging.go)
129133
* [libp2p resource manager messages](https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/scope.go)
130134

131-
### What are the "Application error ... cannot reserve ..." messages?
132-
These are messages from a *remote* go-libp2p peer (likely another Kubo node) with the resource manager enabled on why it failed to establish a connection.
135+
### What are the "Application error 0x0 (remote) ... cannot reserve ..." messages?
136+
These are messages coming from a *remote* go-libp2p peer (likely another Kubo node) with the resource manager enabled on why it failed to establish a connection.
133137

134-
This can be confusing, but these `Application error ... cannot reserve ...` messages can occur even if your local node has the resoure manager disabled.
138+
This can be confusing, but these `Application error 0x0 (remote) ... cannot reserve ...` messages can occur even if your local node has the resoure manager disabled.
135139

136140
You can distinguish resource manager messages originating from your local node if they're from the `resourcemanager` / `libp2p/rcmgr_logging.go` logger
137141
or you see the string that is unique to Kubo (and not in go-libp2p): "Protected from exceeding resource limits".
138142

139-
There is a go-libp2p issue ([#1928](https://github.com/libp2p/go-libp2p/issues/1928)) to make it clearer that this is an error message originating from a remote peer.
143+
There is a go-libp2p issue ([#1928](https://github.com/libp2p/go-libp2p/issues/1928)) to make it even clearer that this is an error message originating from a remote peer.
140144

141145
### How does the resource manager (ResourceMgr) relate to the connection manager (ConnMgr)?
142146
As discussed [here](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#connmanager-vs-resource-manager)

0 commit comments

Comments
 (0)