Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random occurences of "unitialized constant" errors #464

Open
mbajur opened this issue Dec 21, 2024 · 3 comments
Open

Random occurences of "unitialized constant" errors #464

mbajur opened this issue Dec 21, 2024 · 3 comments

Comments

@mbajur
Copy link

mbajur commented Dec 21, 2024

Hello!
Since the very beginning of trying out solid_queue, I'm facing the same issue over and over again. There are two jobs in my app causing "Unitialized constant"exception. One of them is triggered by app and second one is defined as recurring task. From time to time, instead of run them, solid_queue raises uninitialized constant <module name> and the job is not being run. It's so random i can't really pinpoint what's so special about the jobs raising this because today it's one job and tomorrow that might be completely different one.

Natural place to start would be to check out what's special about the jobs that are failing but, as i mentioned, the choice of jobs failing is random and i can run them totally fine with <MyJob>.perform_now so they are fine i guess. It seems just like it's not anything with jobs but with solid_queue that randomly fails to autoload a constants for some reason. One more "predictable" way of causing that is to run scheduled jobs by hand - they will fail 90% of the time with unitialized constant error but 10% of cases will run just fine.

I don't even know what details to provide in here but let's start with that I'm on Rails 7.1.0 and solid_queue 1.0.2.

@rosa
Copy link
Member

rosa commented Dec 21, 2024

@mbajur how are you running Solid Queue?

One more "predictable" way of causing that is to run scheduled jobs by hand - they will fail 90% of the time with unitialized constant error but 10% of cases will run just fine.

What do you mean with this exactly? What do you do to run these jobs "by hand"?

@mbajur
Copy link
Author

mbajur commented Dec 21, 2024

Ah, right, sorry, i meant running them with "Run now" button in mission_control-jobs UI on the Recurring tasks tab.

I'm running solid_queue via kamal with cmd: bin/jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@mbajur @rosa and others