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

Renderer has zombie processes when PDF creation fails #8979

Closed
fniessink opened this issue Jun 14, 2024 · 0 comments · Fixed by #8980
Closed

Renderer has zombie processes when PDF creation fails #8979

fniessink opened this issue Jun 14, 2024 · 0 comments · Fixed by #8980
Assignees
Labels
Bug Something isn't working

Comments

@fniessink
Copy link
Member

Describe the bug
When PDF creation fails, the browser processes are not killed.

To Reproduce
Steps to reproduce the behaviour:

  1. Use curl to create multiple PDF's at the same time on a renderer component with limited resources
  2. One or more render attempts will timeout
  3. The browser processes will not be killed.

Expected behaviour
The browser processes should be killed regardless of whether PDF creation succeeds or not.

Solution
Close the browser in the finally branch of a try/catch statement.

@fniessink fniessink added the Bug Something isn't working label Jun 14, 2024
@fniessink fniessink moved this from Inbox to Ready in Quality-time backlog Jun 14, 2024
@fniessink fniessink changed the title Renderer has zombie processes when PDF creating fails Renderer has zombie processes when PDF creation fails Jun 14, 2024
@fniessink fniessink self-assigned this Jun 14, 2024
@fniessink fniessink moved this from Ready to Development in progress in Quality-time backlog Jun 14, 2024
fniessink added a commit that referenced this issue Jun 14, 2024
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 a pull request Jun 14, 2024 that will close this issue
fniessink added a commit that referenced this issue Jun 14, 2024
Prevent zombie browser processes when creating the PDF fails by moving browser.close() to a finally block of the try/catch.

Closes #8979.
fniessink added a commit that referenced this issue Jun 14, 2024
Prevent zombie browser processes by starting Chromium only once and opening and closing a new page for each render.

Closes #8979.
fniessink added a commit that referenced this issue Jun 14, 2024
Prevent zombie browser processes by starting Chromium only once and opening and closing a new page for each render.

Closes #8979.
@fniessink fniessink moved this from Development in progress to Reviewing in progress in Quality-time backlog Jun 14, 2024
fniessink added a commit that referenced this issue Jun 15, 2024
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 added a commit that referenced this issue Jun 15, 2024
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.
@github-project-automation github-project-automation bot moved this from Reviewing in progress to Merged in Quality-time backlog Jun 15, 2024
@fniessink fniessink moved this from Merged to Release candidate released in Quality-time backlog Jun 18, 2024
@fniessink fniessink moved this from Release candidate released to Released in Quality-time backlog Jul 5, 2024
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
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant