[v7] link count : Job exceeded maximum timeout value (300 seconds)

I got this error Job exceeded maximum timeout value (300 seconds) in update_link_count after I update in version 7. Any ideas? :slight_smile:

{'retry': 4, 'log': <function log at 0x7f6c769fb2a8>, 'site': u'1220.space', 'event': u'all', 'method_name': u'update_link_count', 'method': <function update_link_count at 0x7f6c7796dde8>, 'user': None, 'kwargs': {}, 'async': True, 'job_name': u'frappe.model.utils.link_count.update_link_count'}
Traceback (most recent call last):
  File "/home/ccfiel/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 61, in execute_job
  File "/home/ccfiel/frappe-bench/apps/frappe/frappe/model/utils/link_count.py", line 36, in update_link_count
    raise e
JobTimeoutException: Job exceeded maximum timeout value (300 seconds)

Can I increase the job execution time out?

Same issue being faced here during email notification for PO, SO, etc

Is this¹ what you searched for?

A job has two TTLs, one for the job result and one for the job itself. This means that if you have
job that shouldn’t be executed after a certain amount of time, you can define a TTL as such:

When creating the job:
job = Job.create(func=say_hello, ttl=43)

or when queueing a new job:
job = q.enqueue(count_words_at_url, 'http://nvie.com', ttl=43)

¹ — RQ: Jobs

1 Like

Let me check this link count feature again, maybe we can update once a day.

1 Like

@strixaluco I was more thinking of config in frappe/erpnext to increase the timeout

Can’t help with that, unfortunately.

1 Like

@strixaluco no worries! :slight_smile: