Could be also some periodic maintenances - check them. If anything tries to write (not sure about read) anything to the database during the rebuilding, it crashes the database.
Hi, Paul.
Sounds like you're talking about REST API. And that your are overwriting data with older values if B managed to read record before A finished to update it. Classic conflict resolution ...