Skip to content

BUG - Report Service Failure Root Cause Analysis #26095

Closed

Description

@arlentees

Afternoon of February 20 2025, the service for generating PDF reports started encountering errors:
image.jfif

After a restart the service returned to normal, however, a root cause analysis should be performed to help uncover the cause of the issue and provide actions to take to prevent future failures.

Activity

  1. doug-lovett commented on Feb 21, 2025

    @doug-lovett
    Collaborator

    Background
    The report service is a third party container image Gotenberg that runs a Google chromium engine to generate PDF's.
    Between 6 AM and 12 PM on weekdays we run a minimum of 4 instances; between 12 PM and 6 PM a minimum of 3 instances are running.

    Yesterday between 12:30 PM and 2:30 PM at least 1 of the instances continued to receive requests but started logging this error:
    level":"error", "logger":"api", "method":"POST", "msg":"convert HTML to PDF: convert to PDF: chromium PDF: chrome failed to start:
    /usr/bin/chromium: fork: Resource temporarily unavailable
    As a result request to generate reports were failing. When an API request for a report fails, the API returns JSON instead of a PDF. The Assets UI downloads this JSON as a filename with a .pdf extension.

    After restarting the report service containers at 2:30 PM no more of these errors were logged.

    A change to improve error handling when these report service errors occur will be in the next PPR release. A request to get a report will return an error status code when the report generation fails.

    Recommendations:

    • Increase the minimum number of instances between 12 PM and 6 PM from 3 to 4.
    • Isolate the processing of large search report requests with separate, dedicated report service containers (Thor's suggestion).
    • Investigate monitoring report service log errors if this particular error recurs.
  2. arlentees commented on Feb 21, 2025

    @arlentees
    Author

    Many thanks for looking into this @doug-lovett ! A couple quick follow up questions for you:

    • Is the increase in the number of instances from 3 to 4 a permanent plan, or a stop-gap until the dedicated large report container can get set up?
    • What are the rough estimates for setting up the dedicated service and setting up the monitoring?
  3. doug-lovett commented on Feb 21, 2025

    @doug-lovett
    Collaborator

    @arlentees the instance increase from 3 to 4 is temporary if we isolate large reports to a separate container.
    My estimate for setting up a dedicated large search container is a 3. For monitoring I will defer that to OPs support, there may be a significant cost increase to using the Google monitoring service if applicable. Basically OPs would be alerted if x number of "/usr/bin/chromium: fork: Resource temporarily unavailable" error messages occur over a short interval in the container log.

  4. arlentees commented on Feb 21, 2025

    @arlentees
    Author

    Awesome, thanks again @doug-lovett !

  5. arlentees commented on Mar 24, 2025

    @arlentees
    Author

    closing issue, work has been completed

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions