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

Optionally connect to running Chrome instance #32

Open
soulchild opened this issue Sep 3, 2019 · 4 comments
Open

Optionally connect to running Chrome instance #32

soulchild opened this issue Sep 3, 2019 · 4 comments

Comments

@soulchild
Copy link

Thanks for creating this very useful wrapper around puppeteer, Sindre!

Currently, it launches a Chrome instance for every capture via puppeteer.launch(). Would it make sense, if we added an option to let it connect to a running Chrome instance via puppeteer.connect()? I could take a look at implementing this, if there are no obvious (or not so obvious) arguments against it. 😄

@stefpb
Copy link

stefpb commented Jan 6, 2023

Yes, it would be nice, because puppeter.connect() is faster: https://stackoverflow.com/a/52434730/11830242

@AlejandroAkbal
Copy link

Yes please, I have tons of zombie processes because of this

@soulchild
Copy link
Author

I decided to use the puppeteer library directly, because for my use-case this library was just a small wrapper around it anyways.

I had to deal with zombie processes as well (in a Docker/K8s environment) and the solution was to use tini as my Docker entrypoint which takes care of correctly reaping sub-process zombies.

@AlejandroAkbal
Copy link

Very interesting, I might have to do the same for my https://github.com/AlejandroAkbal/Screenshot-API project

Thanks for the info @soulchild 🙏

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

3 participants