Hi,
This error is becoming very common in our server:
File "trytond/modules/stock/shipment.py", line 2994, in transition_start
self.record.assign_try()
File "trytond/modules/stock_lot/stock.py", line 476, in assign_try
success = super().assign_try(moves, with_childs, grouping)
File "trytond/modules/stock/move.py", line 986, in assign_try
cls._assign_try_lock(
File "trytond/modules/stock/move.py", line 1169, in _assign_try_lock
cursor.execute(*query)
File "trytond/backend/postgresql/database.py", line 68, in execute
cursor.execute(self, sql, args)
LockNotAvailable: could not obtain lock on row in relation "stock_move"
Everytime it happens, I can see that there is a few users trying to assign moves at the same time frame, but I wonder if there is a way to manage this situations, not only to end users but also for administrators, as when It happens it is quite hard to identify what is going on in real time, and checking pg_locks does not help at all (note that I don’t have a problem of a transaction locking a table for ever, the problem gets fixed itself in a moment as the lock ends, but it is still annoying).
Could avoiding the nowait=True in Move._assign_try_lock be a good idea? i’d rather have users waiting for a while than constantly clicking a button which is not working.
Thanks.