Hi there!
We’re starting to get a lot of problems with lock wait timeouts. In particular around the stock ledger entry and general ledger entry tables.
In terms of the stock ledger entries, we’re obviously making a new entry for every transaction, the issue appears to be around getting the key for the next stock ledger entry to insert.
In terms of the general ledger, with reposting, it appears as if large swathes of the table can be locked at a time. In particular if we attempt to submit more than one stock reconciliation (of about 10 000 items each) at a time, we’ll encounter the error.
This is becoming a serious bottleneck for us and we’re not close to running at full scale. It makes the whole system feel incredibly single threaded. Any advise on optimizations would be greatly appreciated!
FWIW, we’re running on AWS ECS with RDS as our DB, so we can always scale up and throw more resources at the problem, but I’m not convinced that’s the solution. I feel we’re already scaled up more than we should need to be.