Repost Item Valuation Error

Hello everyone.
I have a number of Repost Item valuation documents that were generated as a result of backdated transactions (Sales invoice, Purchase Receipt,Stock Entry). I noticed that the background jobs responsible for making the entries fail with following error.

I have modified the supervisor config file, increasing the number of workers and the timeout value, but the error still persists.

Please does anyone have any idea on how to resolve this?
Frappe version v13.36.2
Erpnext version v13.36.3

I have this issue also. It happens perhaps 3-5 times, every week. My suspicion is there’s a timeout happening. But I’m not certain. :thinking:

In another case, I have a long-running function. It successfully finishes when run in a console. However, when run inside a queue, it fails. I did some reading, and it seems there could be a memory issue with Python RQ worker threads. No idea how to solve that, though.

I am very hopeful that this fix by Ankush solves it. But I won’t know until I start using v14, which could be quite a while.

Thanks for your insight, from the logs I noticed the process stops around 25 minutes after the operation starts, I have also modified the supervisor.conf, increasing the stopwaitsecs parameter for that worker. but this has done nothing as well. It seems the feature scales poorly, that is, it is not very efficient for an organization with high sales and purchase frequency.