solid_queue: Intermittant "uninitialized constant RunCaseJob" error when triggering job

Periodically I get this error: image

Here is the raw data:

  {
  "id": 268,
  "queue_name": "bulk_processing",
  "class_name": "RunCaseJob",
  "arguments": {
    "job_class": "RunCaseJob",
    "job_id": "9fcfc846-a982-4ac8-b2e1-11878b2d97af",
    "provider_job_id": null,
    "queue_name": "bulk_processing",
    "priority": null,
    "arguments": [
      {
        "_aj_globalid": "gid://quepid/Case/6789"
      },
      {
        "_aj_globalid": "gid://quepid/Try/63146"
      }
    ],
    "executions": 0,
    "exception_executions": {},
    "locale": "en",
    "timezone": "UTC",
    "enqueued_at": "2024-12-30T16:08:10.153536324Z",
    "scheduled_at": "2024-12-30T16:08:10.150847860Z"
  },
  "priority": 0,
  "active_job_id": "9fcfc846-a982-4ac8-b2e1-11878b2d97af",
  "scheduled_at": "2024-12-30T16:08:10.150Z",
  "finished_at": null,
  "concurrency_key": null,
  "created_at": "2024-12-30T16:08:10.410Z",
  "updated_at": "2024-12-30T16:08:10.410Z"
}

If I retry the job (using mission control) it will give the same error. However, if I resubmit a new RunCaseJob with the same arguments, then that second one runs.

If you are curious, the PR that adds solid_queue to my open source app is here: https://github.com/o19s/quepid/pull/1039

Thanks for any ideas!

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 17 (5 by maintainers)

Most upvoted comments

Incase anyone is still having this issue, I figured out my problem and solution here - https://github.com/rails/solid_queue/issues/276#issuecomment-2762916303

TLDR: This was an issue on my end and SolidQueue is currently running beautifully with the Puma plugin in staging and with bin/jobs in production. The issue was an old container running a 2 month old version of the app.


I was originally using Kamal with a single destination, but split it into deploy.staging.yml and deploy.prod.yml. This worked great until I started using jobs. After far to much chasing down wrong paths, I noticed an odd container when running docker container ls:

9fe40e3246c3 ... PROJECT-web-staging
a776847b129c ... PROJECT-job-staging
8e171eede8ed ... PROJECT-web

🤦🏻‍♂️

docker stop 8e171eede8ed killed the pre-destination-split web server that was dutifully trying to process jobs despite being 2 months out-of-date, and not having the correct gems and code.

This also explains why TurboBroadcast jobs were running fine (gem installed early) but Noticed was not.

I wanted to follow up as I gave my team the demo of the branch that uses Solid Queue, and looking forward to merging and deploying it once we get past this issue.

I checked and my puma.rb doesn’t specify preloading, so I believe it is as the default as I am on puma 6.5.

My set up is also NOT running solid queue in the puma plugin.

The staging version of Quepid is running on Heroku, and the defined start script was bundle exec rake solid_queue:start. I am going to change that to use the bin/jobs instead to see what happens.

The job that is failing is defined as RunJudgeJudyJob

If you are curious @rosa and want an account on the staging server to see “Mission Control” (it’s all public/opensource) I can send you a link.