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
I am facing a memory growth problem on UWebsockets server (RSS). In the example below
In the first phase
uwebsockets server is created, and WS clients connect to it one by one (10 clients in the total), the server sends 100Mb buffer to each of them, after that the client remains active. As a result of these actions RSS memory grows, for each client +100Mb additional memory, which is not allocated back as long as the client will be alive
On the second phase
clients are closed one by one and we can see that the total memory of the process also starts to free 100Mb for the closed client.
How to bypass this behavior so that uws server frees memory and does not keep it for as long as the client is alive (otherwise memory usage grows too high) ?
There is definitely a bug (erase does not shrink the buffer) - this is fixed. However, in practice this cannot cause the bug you report because when the buffer is empty, it does clear which does shrink. So the bug is really just that it waits until the backpressure is FULLY drained before it frees rather than freeing along the drainage.
Good evening,
I am facing a memory growth problem on UWebsockets server (RSS). In the example below
In the first phase
On the second phase
How to bypass this behavior so that uws server frees memory and does not keep it for as long as the client is alive (otherwise memory usage grows too high) ?
nodejs precompiled uwebsocket (require uws2) - https://www.npmjs.com/package/@luminati-io/uws2?activeTab=readme
output for the script is
script
The text was updated successfully, but these errors were encountered: