Severe Bug -- Launching a Worker Without a Key Suffix Then Adding Later Does Nothing
Closed this issue · 10 comments
This morning I launched a worker with a concurrency of 1.
I forgot to include the key_suffix entry.
This limited the whole queue to 1 job at at time. Not exactly what I'd expect to happen but ok.
I added the key suffix to be specific to that job and still nothing.
The only way around this was to rename the worker restart my sidekiq service and let the errors flow for awhile THEN rename the worker to it's correct name and restart my service.
I think this unloads when it can't find worker in the current namespace and renaming triggered a full reload of options? Just speculating here.
Can you please post example code?
sidekiq_throttle({
:concurrency => { :limit => 1 }
}) #make sure this bad boy never runs too often it's too expensive
What I first started running the job with.
Sorry for the delay in responding.
I guess I will need a bit more details, as I really not sure how to reproduce that. Have you restarted sidekiq server after changing the code? I assume you are using rails, if so then which environment are you runnnig when you experience this behavior?
I'm not using rails -- just pure ruby.
I did indeed restart sidekiq after changing the code.
Try not setting a key and running sidekiq with other jobs running at the same time -- concurrent limit will be global.
Without :suffix_key
, concurrency limit is global - that's on purpose. But changing configuration and restarting sidekiq process should pick up fresh config.
Changing configuration and restart sidekiq does not work. That's the bug I at least tried to report initially. You have to take out all references to Sidekiq::Throttled and restart before it'll pick up the new changes.
Hmm. I'll try to reproduce that and will get back to you.
Unfortunately not yet.
I can't reproduce this on my own. If you still experience this issue, please provide a minimal sample that will reproduce your issue.