-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Updating good_job breaks my Rails 7 alpha 2 local development #462
Comments
@leehericks thanks for reporting this. Sounds like a deadlock. I'll try to reproduce. Could you share how and where you're setting up |
@leehericks nuts, I'm having trouble reproducing it. Here is instructions for how you can try to diagnose a deadlock yourself: #236 (comment) Also, if you wanted to find some time on my calendar, I'd love to Zoom on this: https://calendly.com/bensheldon/out-of-office-hours |
@bensheldon Despite running |
*** attached to process 6908
|
Does any of this apply to your project? https://weblog.rubyonrails.org/2021/9/3/autoloading-in-rails-7-get-ready/ |
@leehericks probably not? GoodJob has used Zeitwerk internally for more than a year. Rails Alpha 2 also has been in the test matrix for a few months. Unfortunately these kinds of issues are tricky to trace down. A few more questions:
Thank you again for the help here 🙏 |
|
Just a quick reply re: 4. There should be a v2.7.1 in Ruby Gems: https://rubygems.org/gems/good_job/versions/2.7.1 That's weird if it's not fetchable. |
This is progress that web concurrency affects the behavior. Thank you for debugging this with me; I appreciate it! Could you try adding something like this to your puma config? It explicitly shuts down and restarts GoodJob's thread pools when Puma forks worker processes: |
Ok, now it worked with a |
2.7.1 let's the http requests run, but good_job must not be loading because trying to access the job dashboard yields
|
Oh! I don't think this is the root cause, but one thing at a time: it looks like you have GoodJob::Execution.where(active_job_id: nil).update_all("active_job_id = (serialized_params->>'job_id')::uuid") |
That's interesting. I've got the migrations in my db folder... I'm going to set up an example app from scratch and see if I can reproduce this. |
@bensheldon Ok, it completely comes down to the If both of these lines are commented out then the deadlock will not occur. In Rails 6.1.4.1, it works with web concurrency while still getting this after the first request:
As a note, I upgraded good_job from 2.4.2 to 2.7.3. Both versions work with puma web concurrency enabled in development on Rails 6.1.4.1. So this problem specifically comes out in Rails 7.0.0-alpha2 unless that "Notifier errored" is also not normal. |
The "notifier errored" message is not normal. You could add I'll pick this up tomorrow (Pacific time). |
I couldn't get anything outputted with adding that to my initializer. Thank you for your support! |
oops that may be because there is a typo in the code: |
@leehericks I just set up a new Rails 7.0.0.alpha2 with GoodJob and still can't duplicate the behavior you're seeing 😭 I added you as a collaborator on the repo if you want to pull it down and see if it gives you a different experience, or add your configuration and push it back up for me to try: https://github.com/bensheldon/good_job_rails7/commits/main |
No, I had found that one. |
After comparing and disabling gem by gem I think that good_job is not the cause of the hang. 😅 |
@bensheldon I'm sorry to use so much of your time pinpointing the culprit. |
After running
bundle update
good_job gets mixed in with Puma initialization messages and then I can't getrails server
to server pages in local development. Just hangs.On the otherhand, at
good_job 2.7.0
I'm also getting[GoodJob] Notifier unsubscribed with UNLISTEN
[GoodJob] Notifier errored: no connection to the server
but I can access the site in the browser...
The text was updated successfully, but these errors were encountered: