Does Oban concurrency reflect on Oban timeout

I stumbled upon several cases where Oban jobs set with timeout on the Oban.insert/3 call proceeded to be processed longer than the timeout. I was wondering if, for instance, the concurrency limit is hit while some of these jobs are made available, would the timeout start counting from the moment they are made available or after the job execution itself has started? And how that does work if the same situation with the concurrency limit happens on a retry?

About Oban timeouts I was also wondering is there a place where one can see what the timeout for a certain job is after it has been inserted in the database? I cannot see anything related to it in the database - but in that case how does the timeout work for Oban.insert/3?

The timeout option provided to Oban.insert/3 or Oban.insert_all/3 is passed to Ecto for the database call. For example, a timeout: 500 would allow the database call to take half a second or timeout: infinity would let the call take forever. That timeout value isn’t stored on the job or related to job execution.

Job timeouts are controlled with a worker’s timeout/1 callback. The timeout is applied when the job is executed and isn’t related to when a job was inserted or scheduled.

1 Like

Ah, I see, I had an inkling that might be the case. Thank you very much for the reply!