Skip to content
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

Consistent Warning: Possible EventEmitter memory leak detected notification #72

Closed
brettvitaz opened this issue Jul 25, 2016 · 6 comments

Comments

@brettvitaz
Copy link

brettvitaz commented Jul 25, 2016

After restarting the javascript kernel and directly following the tenth cell execution, there is a warning that consistently appears in the cell block's stderr output:

(node:274) Warning: Possible EventEmitter memory leak detected. 11 unpipe listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 close listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 unpipe listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 close listeners added. Use emitter.setMaxListeners() to increase limit
(node:274) Warning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit

This does not cause any additional trouble executing cells.

Versions:
ijs: 5.0.11
ipython: 5.0.0
npm: 3.10.6
osx: 10.11.6

@n-riesco
Copy link
Owner

I can't reproduce this issue. I've run more than 10 synchronous cells and more than 10 asynchronous cells and I'm unable to trigger this issue.

Would you be able to share a small notebook that triggers this issue?

@brettvitaz
Copy link
Author

brettvitaz commented Jul 25, 2016

Here is an example notebook that triggers the issue.

memory-leak.ipynb.zip

I am able to reproduce the problem on your example docker container ijavascript-node-latest but the problem exists on every system that I've tried.

@n-riesco
Copy link
Owner

I cannot reproduce this issue in Ubuntu 16.04; i.e: ipython v2.4.1 and node v4.2.6.

I'll setup a VM with the latest node and ipython and see if I can reproduce the isssue.

Out of curiosity, how did you reproduce this issue in the docker container?

@brettvitaz
Copy link
Author

I cloned your repo and in the ijavascript-node-latest I ran:

docker build -t ijs .
docker run -p 8888:8888 -ti ijs ./bin/ijavascript.js --ip 0.0.0.0

Fired up chrome, created a new notebook, and started running cells.

@n-riesco
Copy link
Owner

@brettvitaz Thanks for the docker instructions.

I'm baffled that I can't reproduce this issue (even after following your instructions).

Could you make sure the docker container is running IJavascript v5.0.11?

You can confirm this, by running the following the notebook:

console.log(require("child_process").execSync("git rev-parse HEAD").toString());

It should print out 853fcd4853bffbe3bd9269488030b6f8501796cb.

@n-riesco
Copy link
Owner

I've just noticed that my local node:latest was a bit stale (v5.5.0).

After a long wait updating the docker image for node:latest (v6.3.1), I can finally reproduce the issue!

n-riesco added a commit that referenced this issue Jul 30, 2016
* Fix #75 (Prefer Jupyter over IPython to install the kernel).

* Fix #72 (Fix EventEmitter memory leak).

* Add flag `--versions` to show IJavascript and library versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants