Is there a time limit on sidekiq jobs (from a plugin)

AI-generated summary

In a Support discussion titled Is there a time limit on sidekiq jobs (from a plugin), eriko asks whether Sidekiq jobs have a runtime limit, noting that two long-running jobs (5–10 minutes) in the low queue show blank ‘Last Duration’ despite ‘Last Result’ being OK — while a third, faster job in the same queue does report duration. codinghorror questions whether Sidekiq truly has no timeouts, prompting tgxworld to clarify that Sidekiq jobs themselves have no timeouts, and that ‘Last Duration’ and ‘Last Result’ are only tracked for scheduled jobs — not regular ones — since those are managed by a scheduler that doesn’t use Sidekiq options. eriko acknowledges this might explain the discrepancy and plans to review the code. In a follow-up, eriko notes the fast job reporting duration is also in the low queue, adding complexity to the mystery. The jobs in question are part of a plugin managing ~7,000 accounts across two Discourse sites by syncing with an ERP feed — one provisioning/repairing accounts, another deactivating departed users.

I know that sidekiq removed the timeout functionality long ago so I am wonder if there is something else that does that limits the run time of jobs. Here is what I am doing and what I am experiencing. I have two jobs that run in the low que and they take about 5 to 10 minutes to run. When they complete the ‘Last Result’ is listed as OK but the ‘Last Duration’ is listed as blank. So I am asking this because I want to be sure it is really completing and secondarily I would like to know what the runtime in production generally looks like. I only can estimate from my dev instance with all the same data imported. I have one other jobs that runs in the same que and is quick. It has it’s ‘Last Duration’ listed.

What are the jobs for those that are wondering?
For reasons that I will not got into, other than not real IDM, I have a plugin that invasively managed the membership of two discourse sites via a plugin. There are two long running jobs that provision/repair accounts and a second one that deactivates accounts of people that have left. There are generally about 7,000 active accounts. In both cases they compare the reality of the instance against the reality of the feed from our ERP.

Hmm is that true, there are no timeouts on sidekick jobs @tgxworld?

Yea there are no timeouts on Sidekiq jobs from what I know.

@eriko I’m abit confuse because you mentioned that your job runs in the low queue which means it is a regular job. “Last Duration” and “Last Result” is only tracked for scheduled jobs and the jobs are executed by a scheduler manager which doesn’t use any sidekiq options.

That might explain why only one of the three jobs is recording that data. I will have to look at the code in the morning. It could be that the third job is not running in the low queue.

Thank you.

Interestingly the fast running job that does report runtime is also in the low queue.