-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
(Memory leak) Out of memory while replicating the example from the guide book #304
Comments
Can confirm. Did replicate it from the snippet. Present on MacOS Node v11.8.0. |
Our microservice infra is based on Micro toolkit (http://micro-toolkit.github.io/info/), the library uses zeromq for transport, recently we upgrade micro toolkit from zmq to this library and while doing some test I also notice that our microservice get OOMKilled on kubernetes. I was able to replicate this locally and while running the apps they allocate memory without stopping, in this case with a client (dealer socket) Broker (router socket) sending a simple hearbeat I can see the memory increasing continuously. |
Does anyone have any idea what is the version of the library that caused this? I will do some attempts with older versions to check if the behaviour persists. |
I was able to replicate a example where the memory leak problem is present: https://github.com/pjanuario/zmq-mem-leak by running docker-compose up will run a service with a router socket and another one with a dealer socket, by looking the docker stats we can see that memory doesnt stop growing. Running the same example with We had to downgrade our library dependency back to this version to prevent the library from having memory issues. micro-toolkit/event-bus-zeromq#47 I will later try to do some tests to identify where was this problem introduced. |
Confirming - we have done our research and we are 100% sure that it's because of zeromq (4.6.0). |
Revert to 4.2.1 didn't help... |
hey hey also tested the reproducer from https://github.com/pjanuario/zmq-mem-leak with 5.2.0 -> it's still increasing |
hmm maybe nevermind. it seems the issue with the reproducer is that it blocks the javascript event loop.
i'll verify by letting this run for a longer time. edit: even after running for two straight hours memory does not increase here, zeromq.js 5.2 sorry for the hazzle :) |
Using the following code from the weather example i was getting frequent JS out of memory exception from GC.
I have then attempted to check heap memory usage and its growing in alarming pace. The following code is sufficient to reproduce:
Is that normal?
My Node version is
v10.11.0
The text was updated successfully, but these errors were encountered: