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

Windows binary appears to leak memory/hold onto Chrome instances #574

Open
danyill opened this issue Nov 25, 2021 · 1 comment
Open

Windows binary appears to leak memory/hold onto Chrome instances #574

danyill opened this issue Nov 25, 2021 · 1 comment

Comments

@danyill
Copy link
Sponsor Contributor

danyill commented Nov 25, 2021

I use the latest binary build of asciidoctor-web-pdf on Windows typically using the --watch and often the --preview options. I think was the version: v1.0.0-alpha.12.

After some time (and occasionally restarting the process) I often find I have many browser instances visible when I press Ctrl+Alt+Del and look at the processes, even though there is no open window. I usually notice this because the system is starting to slow down and I realise these browser instances are consuming excessive memory.

I'm not sure how best to diagnose this -- I'm sorry this is not a more helpful bug description. I hope to look into this more in future. The Windows system I most commonly use I don't have administrative rights to but perhaps I can pull out a process tree somehow.

@ggrossetie
Copy link
Owner

After some time (and occasionally restarting the process)

Does it happen even if you don't restart (i.e., kill/restart) the process? In other words, do you think it leaves Chrome processes after a <CTRL> + <C>?
When watch or preview is enabled we do not close/restart the instance:

https://github.com/Mogztter/asciidoctor-web-pdf/blob/3e1bb2ecf1b781f06bf555556b0935496283ac15/lib/converter.js#L134-L141

And we are using a single page (we only create a new page if there's no active page):

https://github.com/Mogztter/asciidoctor-web-pdf/blob/main/lib/browser.js

We could probably add logs in the browser.js to troubleshoot.

Also do you reproduce this issue when using Node.js directly (instead of the binary)?

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

No branches or pull requests

2 participants