Skip to content

Finished jobs ending up as failed with SolidQueue::Processes::ProcessPrunedError #589

Closed

Description

@ericwecasa

Hey there 👋

We're seeing an issue where some finished jobs are unexpectedly ending up in the failed jobs morgue with the following error:
SolidQueue::Processes::ProcessPrunedError

some other jobs genuinely fail, but we're concerned about the false positives: finished jobs incorrectly marked as failed.

This is creating noise in our monitoring and makes it harder to distinguish real failures from completed jobs.

Any insight into why this might be happening, or how we can prevent it, would be greatly appreciated!

Thanks in advance!

rails (7.2.2.1)
ruby (3.3.0)
solid_queue (1.1.0)

Activity

  1. rosa commented on Jun 28, 2025

    @rosa
    Member

    Hey @ericwecasa, sorry about this! When you say they jobs are finished, what do you mean exactly?

  2. ericwecasa commented on Jun 30, 2025

    @ericwecasa
    Author

    Hi @rosa, the finished_at value is solid_queue_jobs table is filled out.
    FYI, not sure if this information is relevant, we use the gem mission-control as a dashboard

  3. rosa commented on Jul 20, 2025

    @rosa
    Member

    Hey @ericwecasa, so sorry for the delay! I missed that last comment 😳

    This is really strange! I can't imagine how this can happen, because for a job to fail with a ProcessPrunedError, its associated claimed_execution needs to exist and be associated with a process that has been pruned (found dead). This is the only place where jobs are failed in that way. However, a job is marked as finished in the same transaction as its claimed execution is deleted. This is why I was asking what you meant by finished, because I assumed it wouldn't be that the job had finished_at set.

    The next time you get one of those, could you get screenshots of all the data of the failed job from Mission Control?

  4. rosa commented on Aug 29, 2026

    @rosa
    Member

    Sorry for the long silence here! This was a real race, and it got fixed in v1.5.0 by #761.

    What was happening: a worker that was still alive but whose heartbeat had gone stale (a temporary DB hiccup, for example) could be pruned by another process, which failed its claimed jobs with ProcessPrunedError. If the worker finished one of those jobs at the same time, both transactions went through, because deleting an already-deleted claimed execution didn't raise. That's how a job could end up both finished and failed. Since #761, a claimed execution is finalized exactly once, under a row lock, so whichever side gets there second finds nothing to do.

    I'm going to close this one; if you see it again on 1.5.0 or later, please reopen with the details and I'll take another look.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions