ceramicnetwork / js-ipfs-ceramic

Wraps js-ipfs instance with dag-jose codec enabled.
Other
3 stars 0 forks source link

Increase max listeners #16

Open v-stickykeys opened 3 years ago

v-stickykeys commented 3 years ago

We are getting this warning which we still want but at a higher level

(node:27) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit
v-stickykeys commented 3 years ago

Will try 50 but may be relative to number peers connected (limits are 200-500)

v-stickykeys commented 3 years ago

@zachferland haven't found a way to do this. do you know how?

stbrody commented 3 years ago

Maybe process.setMaxListeners? https://stackoverflow.com/questions/9768444/possible-eventemitter-memory-leak-detected

oed commented 3 years ago

That would only work in nodejs? Maybe that's fine since this repo will only run on our infra?

stbrody commented 3 years ago

That would only work in nodejs? Maybe that's fine since this repo will only run on our infra?

I don't really understand what you're getting at here. Only work in nodejs as opposed to what? This seems like a javascript-specific issue to begin with? Or do you mean server-side nodejs as opposed to in-browser?

oed commented 3 years ago

@stbrody I assume the process variable is only available in nodejs, and not in browsers.

stbrody commented 3 years ago

I just found this issue, which suggests that ipfs.pubsub.setMaxListeners might do the trick

v-stickykeys commented 3 years ago

I just found this issue, which suggests that ipfs.pubsub.setMaxListeners might do the trick

@stbrody yeah I tried this but it said setMaxListeners did not exist on it

v-stickykeys commented 3 years ago

That would only work in nodejs? Maybe that's fine since this repo will only run on our infra?

yeah exactly @oed this would be the ipfs instances we run on our infra