Error: frappe.utils.global_search.rebuild_for_doctype

Installed Apps:

ERPNext: v12.24.0 (version-12)
Frappe Framework: v12.21.1 (version-12)

I am in the process of eliminating duplicates from our Items and hence merging documents. However, I am getting the following error in the logs each time I do so:

{‘site’: ‘site1’, ‘method’: <function rebuild_for_doctype at 0x7f84608e7a60>, ‘event’: None, ‘job_name’: ‘frappe.utils.global_search.rebuild_for_doctype’, ‘kwargs’: {‘doctype’: ‘Item’}, ‘user’: ‘’, ‘is_async’: True, ‘retry’: 0, ‘log’: <function log at 0x7f84605185e0>, ‘method_name’: ‘frappe.utils.global_search.rebuild_for_doctype’}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 102, in execute_job
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 131, in rebuild_for_doctype
d = frappe.get_doc(doctype,
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 765, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 71, in get_doc
return controller(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/”, line 16, in init
super(WebsiteGenerator, self).init(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 106, in init
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 166, in load_from_db
self.set(df.fieldname, [])
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 136, in set
self.extend(key, value)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/rq/”, line 63, in handle_death_penalty
raise self._exception('Task exceeded maximum timeout value ’
rq.timeouts.JobTimeoutException: Task exceeded maximum timeout value (300 seconds)

The merge appears to have completed successfully on the front end. However, I am facing the issue of having background jobs piling up.

I would appreciate any help to resolve this.

Can anyone help with this?

Have you find a solution for that, I have the same error.

It seems a timeout problem. You may try

bench config http_timeout 6000
bench setup supervisor
bench setup nginx

Restart services (as root)

supervisorctl reload
service nginx reload

Hi @TurkerTunali ,

Thanks for taking the time to respond.

I have moved on to V13 and I am on Frappe Cloud and do not seem to be having the same issue anymore.

For my own knowledge and for others, if you are on Frappe Cloud you cannot access these settings right?