Skip to Content

Contributors

Re: ERROR: could not serialize access due to concurrent update (case using Job Queue)

If talking about picking generation, I wouldn't do reserve at that time, and do a general "reserve round" at the end of the batch, and thus, you remove the quant lock constraint.

Regards.

by Pedro M. Baeza - 03:31 - 4 Mar 2024

Reference

  • ERROR: could not serialize access due to concurrent update (case using Job Queue)
    Dear community,

    We have a case that needs to process a lot of transactions (500k arrive on the last day of month). And so we rely on our best friend OCA's Job Queue and have things run in parallel.

    Most process are OK, but the one creates stock picking, jobs can't run in parallel because there is a concurrent issue on the "stock_quant" table, which looks like many separated job is updating the same record.

    bad query:  update stock_quant set reserved_quantity = 10.00 ... where id in (100)
    ERROR: could not serialize access due to concurrent update
    bad query:  update stock_quant set reserved_quantity = 10.00 ... where id in (100)
    ERROR: could not serialize access due to concurrent update
    .....

    Concurrent updates are very common issues we always face. How do you get around with this problem?

    Thank you,
    Kitti U.









    by Kitti Upariphutthiphong - 02:16 - 4 Mar 2024