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

Stop process if error during initialise #414

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

20TRIES
Copy link
Contributor

@20TRIES 20TRIES commented Oct 19, 2023

We use Ferrum with Puma and found that if an error is raised during initialisation of the browser, then chrome processes do not get stopped until the garbage collection runs.

Equally there is no way to stop these processes from the perspective of somebody using Ferrum because we never get a browser object back as the initialize method is raising the error.

From what i can tell, garbage collection doesn't run immediately and so these processes can live for longer then they need to.

By catching any errors raised between the process being started and returning from the browser initialiser then we can ensure that we stop any processes which were started.

@route
Copy link
Member

route commented Nov 9, 2023

Thank you! Looks good!

@route route merged commit 00ffc0d into rubycdp:main Nov 9, 2023
0 of 10 checks passed
@20TRIES 20TRIES deleted the stop-process-if-error-during-initilize branch December 12, 2023 11:05
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

Successfully merging this pull request may close these issues.

2 participants