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

Memory leak on creating multiple browsers? #117

Open
laggingreflex opened this issue Feb 20, 2016 · 1 comment
Open

Memory leak on creating multiple browsers? #117

laggingreflex opened this issue Feb 20, 2016 · 1 comment
Labels

Comments

@laggingreflex
Copy link

I'm creating lots of browser instances with driver.create() in a batch (~10 or so instances at once) and even though I'm exiting them all with browser.exit() before creating another batch, I'm seeing huge spikes of memory and eventually the node process exits giving memory allocation error (in pm2).

I measured by simply creating new instances and calculating increase in process.memoryUsage().heapUsed and it shows ~1-3% increase on every instance, eventually building up ~45% in just 20 iterations (create=>exit=>create).

Could this be a bug in the library or is this bound to happen when you create so many instances?

edit: added a test

@puzrin
Copy link
Contributor

puzrin commented Apr 8, 2016

v8 GC strategy depends on amount of available memory. Simple check of occupied process memory can not say that it's a real memory leak. Because node's memory really increase to some point after run.

May be, you really have few of memory, and forked phantoms leave nothing for node.js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants