You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pass a payload (string or binary) of more than 25kb, you get not only 1000x latency, but also an infinite memory leak. Looks like sender objects are not "dequequed".
Steps to reproduce (if the current behaviour is a bug)
Here is the fiddle to reproduce the case, including memory heap snapshot. Just run server.js and then client.js with Node.js.
Expected behaviour
Not to have a memory leak
Setup
OS: Linux Ubuntu 19.10
browser: Server version, nodejs
socket.io version: 2.3.0
NodeJS: v12.15.0
Other information (e.g. stacktraces, related issues, suggestions how to fix)
I have been digging the engine.io & Websocket code. I know for a fact, that the dequeue function at sender.js is not called and that generates the memory leak. Like that function works on the premise of the _deflating prop, made me think that disabling compression would help (and it did). In the example i provide, can also be observed that passing a less than 25kb payload but as string, has the same result. Unfortunately, i don't have the time to dig more into an unknown codebase for now, if this is not fixed in the future, i'll look at it again in more detail to help as much as i can.
The text was updated successfully, but these errors were encountered:
You want to:
Current behaviour
If you pass a payload (string or binary) of more than 25kb, you get not only 1000x latency, but also an infinite memory leak. Looks like sender objects are not "dequequed".
Steps to reproduce (if the current behaviour is a bug)
Here is the fiddle to reproduce the case, including memory heap snapshot. Just run server.js and then client.js with Node.js.
Expected behaviour
Not to have a memory leak
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
I have been digging the engine.io & Websocket code. I know for a fact, that the dequeue function at sender.js is not called and that generates the memory leak. Like that function works on the premise of the
_deflating
prop, made me think that disabling compression would help (and it did). In the example i provide, can also be observed that passing a less than 25kb payload but as string, has the same result. Unfortunately, i don't have the time to dig more into an unknown codebase for now, if this is not fixed in the future, i'll look at it again in more detail to help as much as i can.The text was updated successfully, but these errors were encountered: