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

Close renderer headless browser in finally block. #8980

Merged

Conversation

fniessink
Copy link
Member

Prevent zombie browser processes when creating the PDF fails by moving browser.close() to a finally block of the try/catch.

Closes #8979.

@fniessink fniessink linked an issue Jun 14, 2024 that may be closed by this pull request
@fniessink fniessink marked this pull request as ready for review June 14, 2024 09:48
@fniessink fniessink force-pushed the 8979-renderer-has-zombie-processes-when-pdf-creation-fails branch 3 times, most recently from fa423ed to 3ffae07 Compare June 14, 2024 14:22
@fniessink fniessink added the Bug Something isn't working label Jun 14, 2024
@fniessink fniessink requested a review from wkoot June 14, 2024 14:22
docs/src/changelog.md Outdated Show resolved Hide resolved
components/renderer/src/index.js Show resolved Hide resolved
components/renderer/src/index.js Show resolved Hide resolved
Closing the Chromium browser in the renderer component after creating a PDF would not stop all browser child processes. Fixed by starting Chromium only once and reusing, instead of starting a new browser for each render.

Fixes #8979.
@fniessink fniessink force-pushed the 8979-renderer-has-zombie-processes-when-pdf-creation-fails branch from 3ffae07 to 1ba0de1 Compare June 15, 2024 10:04
Copy link

sonarcloud bot commented Jun 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@fniessink fniessink merged commit 4abcd6b into master Jun 15, 2024
39 checks passed
@fniessink fniessink deleted the 8979-renderer-has-zombie-processes-when-pdf-creation-fails branch June 15, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renderer has zombie processes when PDF creation fails
2 participants