The Auto Attendance background job “shift_type.process_auto_attendance_for_all_shifts” keep failing and giving me the following error:
Traceback (most recent call last):
File "apps/frappe/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py", line 85, in execute
frappe.get_attr(self.method)()
File "apps/erpnext/erpnext/hr/doctype/shift_type/shift_type.py", line 174, in process_auto_attendance_for_all_shifts
doc.process_auto_attendance()
File "apps/erpnext/erpnext/hr/doctype/shift_type/shift_type.py", line 67, in process_auto_attendance
self.mark_absent_for_dates_with_no_attendance(employee)
File "apps/erpnext/erpnext/hr/doctype/shift_type/shift_type.py", line 142, in mark_absent_for_dates_with_no_attendance
attendance = mark_attendance(employee, date, "Absent", self.name)
File "apps/erpnext/erpnext/hr/doctype/attendance/attendance.py", line 195, in mark_attendance
attendance.insert()
File "apps/frappe/frappe/model/document.py", line 255, in insert
self._validate_links()
File "apps/frappe/frappe/model/document.py", line 899, in _validate_links
invalid_links, cancelled_links = self.get_invalid_links()
File "apps/frappe/frappe/model/base_document.py", line 633, in get_invalid_links
values = frappe.db.get_value(doctype, docname, values_to_fetch, as_dict=True)
File "apps/frappe/frappe/database/database.py", line 459, in get_value
ret = self.get_values(
File "apps/frappe/frappe/database/database.py", line 531, in get_values
out = self._get_values_from_table(
File "apps/frappe/frappe/database/database.py", line 726, in _get_values_from_table
r = self.sql(
File "apps/frappe/frappe/database/database.py", line 174, in sql
self._cursor.execute(query, values)
File "env/lib/python3.8/site-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "env/lib/python3.8/site-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "env/lib/python3.8/site-packages/pymysql/connections.py", line 547, in query
self._execute_command(COMMAND.COM_QUERY, sql)
File "env/lib/python3.8/site-packages/pymysql/connections.py", line 814, in _execute_command
self._write_bytes(packet)
File "env/lib/python3.8/site-packages/pymysql/connections.py", line 754, in _write_bytes
self._sock.settimeout(self._write_timeout)
File "env/lib/python3.8/site-packages/rq/timeouts.py", line 63, in handle_death_penalty
raise self._exception('Task exceeded maximum timeout value '
rq.timeouts.JobTimeoutException: Task exceeded maximum timeout value (300 seconds)