You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Finished jobs ending up as failed with SolidQueue::Processes::ProcessPrunedError #589
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!
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
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.
Activity
rosa commentedon Jun 28, 2025
Hey @ericwecasa, sorry about this! When you say they jobs are finished, what do you mean exactly?
ericwecasa commentedon Jun 30, 2025
Hi @rosa, the
finished_atvalue is solid_queue_jobs table is filled out.FYI, not sure if this information is relevant, we use the gem
mission-controlas a dashboardrosa commentedon Jul 20, 2025
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 associatedclaimed_executionneeds 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 hadfinished_atset.The next time you get one of those, could you get screenshots of all the data of the failed job from Mission Control?
rosa commentedon Aug 29, 2026
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.