-
Notifications
You must be signed in to change notification settings - Fork 70
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
If beanstalkd dies, ::Forking workers never reconnect #93
Comments
@mexisme I see what you're saying with the conflation bit there. What it should probably do is pass the newly-minted Connection into the |
@nesquena Memoizing the connection as a static/class variable seems to be causing several problems. What do you think about moving it strictly to an instance variable? Then no more problems like this. |
@contentfree 👍 makes sense, thanks for tracking this down |
Thanks, @contentfree, that looks like a smarter way forward. |
When using the ::Forking worker, I'm seeing errors like the below when
beanstalkd
is stopped or dies (e.g. server restart).The worker fails over and over, and never makes a fresh connection.
I have a suspicion it has something to do with conflation between https://github.com/nesquena/backburner/blob/master/lib/backburner/worker.rb#L58
where you're using a class var (
@connection
) but in https://github.com/nesquena/backburner/blob/master/lib/backburner/workers/forking.rb#L32 you appear to be trying to override an instance var (also@connection
) and yet https://github.com/nesquena/backburner/blob/master/lib/backburner/worker.rb#L126 uses the aboveself.connection
class method (and class var).Does this mean that all the forked children are trying to reuse the parent's
@connection
and it's no-longer valid, because the associatedbeanstalkd
has gone/restarted?It's possible this may be related to #61?
Thanks.
The text was updated successfully, but these errors were encountered: