-
-
Notifications
You must be signed in to change notification settings - Fork 327
Too many listeners #105
Comments
Trying to watch contract events causes the same warning:
|
Adding this line to the top of |
Increasing the limit doesn't help. |
I've been inclined to think this is just a warning, because we use a very event-emitter heavy design pattern. Do you think it's a real memory leak? Have you tried looking in the memory inspector? (Just asking, otherwise we'll just have to follow up & investigate). |
@FlySwatter, After this warning shows up the application no longer receives events from the network(not sure). The code I'm using is posted above. I'm also not sure if it's memory leak or not. Could you recomend a memory inspector for Ubuntu? I haven't used memory inspectors before. |
Chrome (and I think Chromium) has a great memory inspector built in. Once you've pulled up the console with the warning, go to the If the memory goes up but doesn't go down, it's a leak.
I wish you were sure ;) If this really is breaking the connection, you should have a message in your main page console like "MetaMask Inpage Provider lost connection". Are you seeing that? Anyways, if it seems to really be breaking the connection, that's a much bigger deal than I thought it was. I thought it was just a warning. Will try to put some time on this soon. |
@FlySwatter, thank you for the quick introduction into the browser memory inspection. I should have been clear that I'm using this code in the backend. I have never run this code in the browser. My NodeJS server uses it to listen to contract events. Anyway, I will post something more conclusive here when I get enough information. |
I'm having this issue all of a sudden as well. Breaks everything. I'll investigate more later, but closing chrome and my test rpc doesn't solve the issue. It makes me a sad panda. This was working 20 minutes ago. I've been testing and calling the filter function a bunch, but now it seems to have a bunch of open connections stored somewhere. |
I too suddenly started having this issue about 5-6 hours ago. If I load my site with metamask disabled, no errors, but when MetaMask is enabled I get the "11 listeners error". It seems to be affecting my site being able to grab the new web3.eth.accounts[0] object when accounts are switched. @FlySwatter the error logs show the lines And actually this seems to be locking the web3.eth.accounts[0] object to whatever it is instantiated as. My MetaMask UI says I'm on account 0xB26A.. but console.log prints |
To address this bug, we've done a hotfix rollback to 3.10.0, you should see the previous behavior resume soon, and we'll fix this again soon. |
i'm having this same error this morning with no code changes |
What version are you on? Should be fixed again with 3.10.2. |
i'm not sure, after pulling out my hair a minute i just uninstalled and reinstalled and the issue is fixed |
Thanks for the quick fix! |
Oh hey, sorry for missing this thread when updating MetaMask/metamask-extension#2122 If you were affected by this issue, we have a partial fix, but we're looking for people who still have issues. If you're a developer, and had this issue, it would help us if you could manually install this build and if you have issues, give us reproduction steps: |
I don't seem to have this issue in the browser, but I do get the warning in Node.js.
I'm using 0x on the server side and using the web3 provider engine to listen to certain 0x log events (fill, cancel, error). I've added the filter and RPC subproviders. The RPC subprovider is connected to Infura. |
#105 adding option for setting max stoplight listeners.
@riteable did you sort it out? We're getting the same warning in Node. We're also connecting to Infura (via |
When sending a transaction, I get an error:
It's coming from the Filter subprovider onFilterChange
_ready.on
method. That_ready
object needs its listener max raised, or has a memory leak.The text was updated successfully, but these errors were encountered: