-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MaxListenersExceededWarning: Possible EventEmitter memory leak detected #1541
Comments
Hi @tonymccallie, Thank you for opening this issue. Could you please provide some more details on this? Such as what version of the SDK you're on, what browsers etc? Regards, |
We are using twilio-video 2.15.3 and Chrome 92.0.4515.131 on macOS 11.5.1 |
Thanks for those details @tonymccallie, could you also provide some repro steps as well? I can't seem to reproduce this issue. Currently, I'm joining a room and disconnecting from the room, about 10x times without hitting that warning. Best, |
Joyce, The problem happens when you join six separate rooms at once.. for a broadcast. Thanks, Tony |
Hi @tonymccallie, I've attempted to reproduce this using our react app. Joined 6 rooms concurrently and added a 7th just for good measure, and still unable to reproduce this. Can you test out our react app to see if you're hitting these same issues? Thanks, |
Did you publish media to the rooms? Or just connect. I should have clarified. Our entire app is built in Angular, not react. |
Hey @tonymccallie Thank you for that information! I've got a repro going. Publish a single track, and in my case I was publishing a single video track, and it was being published to 10 different rooms. It seems that as a default, event emitters have a maximum of 10 listeners for a particular event. Here's a couple of options:
Please let me know if this works for you! Best, |
I'm glad you were able to reproduce this. I will try option 2 tomorrow and see if I can get that to work. I'll report back my findings. Thanks, Tony |
Joyce, I was able to attach 8 rooms with no errors by setting videoTrack.setMaxListeners(20). Thanks for your help! |
A new problem though, this only pushes the problem out, it doesn't fix it. I was able to attach 8 rooms, but as soon as I detached those 8 rooms and added 8 new ones, I got the error again. We are working on an environment that is most likely on for 8 hours or more with several broadcasts of rooms starting and stopping. We will hit this error if the listeners aren't being cleaned up. |
Hi @tonymccallie, Thanks for letting me know. I've filed an internal ticket to track this issue and investigate further. I'll keep this thread open and keep it updated. Please let me know if you come across any other issues! Thanks again, |
Joyce, We met with Sergio today and were able to replicate the problem in Safari as well. He said he would try and contact you about this issue as well. Thanks, Tony |
Hi @tonymccallie, Many apologies for the late response. As you may have heard from Sergio, the internal ticket that was filed for this issue is VIDEO-6529. I'm updating this thread in order for us to continue tracking the issue! Best, |
We encountered this today as well. If you switch rooms (join + leave) 10 or more times, this event emitter leak warning appears in the console. I believe the issue is that there is no twilio-video.js/lib/localparticipant.js Line 336 in 8050ae8
|
Hi @canadaduane! Thanks! I'll be handing this off to @manjeshbhargav. Cheers |
I'm having the same problem. We have a remote support app and if the support person connects/disconnects 10 times we receive this error on the person being helped side. The person being helped only ever connects a single room once. |
When connecting to more than 5 rooms (a necessity for us to handle groups larger than 50) we start getting these errors as soon as we connect the 6th room:
Can you increase the limit? Or how can we handle larger amounts of rooms/participants? We are needing to host events with possibly hundreds of participants.
The text was updated successfully, but these errors were encountered: