{"record":{"id":"734ba63d3bb38c83","repo":"ipfs/kubo","slug":"creating-final-resource-manager-config-w","errorCode":null,"errorMessage":"creating final Resource Manager config: %w","messagePattern":"creating final Resource Manager config: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/libp2p/rcmgr.go","lineNumber":52,"sourceCode":"\t\tvar manager network.ResourceManager\n\t\tvar opts Libp2pOpts\n\n\t\tenabled := cfg.ResourceMgr.Enabled.WithDefault(true)\n\n\t\t//  ENV overrides Config (if present)\n\t\tswitch os.Getenv(\"LIBP2P_RCMGR\") {\n\t\tcase \"0\", \"false\":\n\t\t\tenabled = false\n\t\tcase \"1\", \"true\":\n\t\t\tenabled = true\n\t\t}\n\n\t\tif enabled {\n\t\t\tlog.Debug(\"libp2p resource manager is enabled\")\n\n\t\t\tlimitConfig, msg, err := LimitConfig(cfg, userResourceOverrides)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, opts, fmt.Errorf(\"creating final Resource Manager config: %w\", err)\n\t\t\t}\n\n\t\t\tif !isPartialConfigEmpty(userResourceOverrides) {\n\t\t\t\trcmgrLogger.Info(`\nlibp2p-resource-limit-overrides.json has been loaded, \"default\" fields will be\nfilled in with autocomputed defaults.`)\n\t\t\t}\n\n\t\t\t// We want to see this message on startup, that's why we are using fmt instead of log.\n\t\t\trcmgrLogger.Info(msg)\n\n\t\t\tif err := ensureConnMgrMakeSenseVsResourceMgr(limitConfig, cfg); err != nil {\n\t\t\t\treturn nil, opts, err\n\t\t\t}\n\n\t\t\tstr, err := rcmgr.NewStatsTraceReporter()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, opts, err","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/libp2p/rcmgr.go#L34-L70","documentation":"While constructing the libp2p resource manager at daemon startup, LimitConfig failed to merge the configured limits with user resource overrides -- typically malformed Swarm.ResourceMgr.Limits or Swarm.ResourceMgr.Scope in the config file.","triggerScenarios":"Thrown at core/node/libp2p/rcmgr.go:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect Swarm.ResourceMgr.Limits and .Scope entries in the config for invalid keys, negative numbers, or wrong types","Reset to defaults with 'ipfs config profile apply default' style fixes or remove the custom limits section","Consult docs/libp2p-resource-management.md for the expected schema"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}