Sidekiq: Job running multiple times

Created on 16 May 2017  路  4Comments  路  Source: mperham/sidekiq

I am using Sidekiq Enterprise and we have a number of periodic jobs setup.

One of the jobs is a fairly lengthy process (> 2 hours) scheduled for once a day, and recently it has begun running multiple times 鈥斅爋nce at the scheduled time, then again about 1.25 hours later, and then a third time about an hour after that.

All three runs complete (logs show "INFO: done" three times). All three jobs have the same job id. There's no record in the logs of the job failing (i.e. "INFO: fail").

We haven't made any changes to the Sidekiq initializer/configuration, and the job was running fine before. The only thing I can think has changed is that the job may be taking a little bit longer to complete than before. However the repeat jobs begin long before it completes.

Is there a reason you can imagine this could happen?

Most helpful comment

Are you using timed_fetch? If so, switch to super_fetch.

All 4 comments

Are you using timed_fetch? If so, switch to super_fetch.

We are using timed_fetch; didn't know about super_fetch. Thanks for the quick response!

I see on this page that timed_fetch has a global timeout. What is that timeout and is it configurable?

Are there any downsides or migration concerns with switching to super_fetch?

The timeout, as you have discovered, is one hour. Migration concerns: just make sure your Sidekiq processes shut down cleanly so you don't leave any jobs lingering in the Pending set forever.

Awesome. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlecour picture jlecour  路  4Comments

aglushkov picture aglushkov  路  3Comments

sandstrom picture sandstrom  路  3Comments

fatcatt316 picture fatcatt316  路  4Comments

smanolloff picture smanolloff  路  3Comments