I developing a frappe synchronize apps between erpnext and financial system. However, due to the large record need to be synced, the sync often crash at 300 second with error: JobTimeoutException: Job exceeded maximum timeout value (300 seconds).
When I execute from bench it’s ok, the system don’t drop the sync def. However, when use Scheduler, even I edit the supervisor.cfg, the problem still the same.
Can you let me know is there anyway to execute the function without timeout or longer timeout?
default timeout for scheduler event is 300 second, But you can use the hourly_long, daily_long events
_long events have the timeout 1500 seconds.
You can check the timeout mapping for event in background_jobs.py
Thank you for your solution, I end up to increase into 15600s to handle enough data per day.
However, there is other problems:
Priority for process. Such as process gunicorn (front-end) is always higher than python or worker. , such gunicorn runing around 90% cpu, python only go down around 1-2%.
MySQL: can we take seperate for the connection to MariaDB between worker and front-end? Currently, it will result in some error like this in peak time:
OperationalError: (1205, 'Lock wait timeout exceeded; try restarting transaction