libp2p / js-libp2p-websocket-star

libp2p-webrtc-star without webrtc. Just plain socket.io.
https://libp2p.io
39 stars 15 forks source link

Possible EventEmitter memory leak detected bug in Rendezvous #58

Open patientplatypus opened 6 years ago

patientplatypus commented 6 years ago

So, I don't really know how to debug this and I find it pretty frustrating. The rendezvous server that is mentioned here hits memory leaks when developing on localhost - this makes me incredibly uncertain about deploying this to production.

patientplatypus:~/Documents/zennify.me/backend:14:25:57$rendezvous --port=9090 --host=127.0.0.1
Listening on: http://127.0.0.1:9090
(node:64740) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added. Use emitter.setMaxListeners() to increase limit
(node:64740) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added. Use emitter.setMaxListeners() to increase limit

What is the solution to this? If it's as simple as changing something in the Rendezvous server code, can we do that? Is there a node setting I have to toggle (I don't know whether setting maxListeners actually solves the problem or kicks the can)? I haven't actually seen this sort of error before and I'm uncertain as to how to debug.

mkg20001 commented 6 years ago

We're aware of this bug and have no idea how to fix it either. If you manage to fix it, that would be really awesome