Skip to content

unable to retry on SolidQueue::ProcessExitError #313

Closed

Description

@InteNs

hello again!

After updating to V0.6 we naturally started getting failed jobs with SolidQueue::ProcessExitError as the error causing the job to fail.

This looked like a perfect candidate of an exception that we should always retry so i tried adding the following to ApplicationJob:

retry_on SolidQueue::ProcessExitError, wait: :polynomially_longer, attempts: 5

unfortunately it seems that this error class is not known to the application:

app/jobs/application_job.rb:16:in `<class:ApplicationJob>': uninitialized constant SolidQueue::ProcessExitError (NameError)

           SolidQueue::ProcessExitError,
                     ^^^^^^^^^^^^^^^^^^
Did you mean?  SolidQueue::Processes
	from app/jobs/application_job.rb:1:in `<top (required)>'

any ideas as to why this class is not loaded in the rails app?

maybe because the supervisor is loaded in another process (docker container in my case) and not the server process where jobs are actually scheduled?

Activity

  1. rosa commented on Aug 30, 2024

    @rosa
    Member

    Ohhh, yes! Agh, my fault. The SolidQueue::ProcessExitError class is not set up properly in a way that Zeitwerk can load it. It's loaded for Solid Queue because the file is loaded anyway before forking, but that won't be the case where you enqueue the job.

    I'll fix it and will release a new version with the fix shortly.

  2. added 2 commits that reference this issue on Aug 30, 2024
    af89563
    3f92809
  3. rosa commented on Aug 30, 2024

    @rosa
    Member

    Released v0.6.1 with the fix. The error is now SolidQueue::Processes::ProcessExitError.

  4. added a commit that references this issue on Sep 2, 2024
    46f66de
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