Resource limit exceeded

Hi, I am hosting my own libp2p relay on AWS and it gives error: Resource Limit Exceeded. However, I am pretty sure it is a false alarm. it causes the relay to not work after that. How can I disable the resource manager for relay?

1 Like

I’ve ran into this issue as well, but I was never able to make it happen consistently.

// Sometimes the swarm_stream is left open, but the underlying yamux_stream is closed.
// This causes the resource limit to be reached. We Need to add monitoring and force to close old streams
resourceManager, err := rcmgr.NewResourceManager(rcmgr.NewFixedLimiter(rcmgr.InfiniteLimits))
if err != nil {
  return d, err
}
opts = append(opts, libp2p.ResourceManager(resourceManager))
d.Host, err = libp2p.New(opts...)
1 Like