I have created a very simple headless flow.
A Record Lookup (custom object) followed by a Record Create (Contact) and finally a Record Update (the same custom object). A workflow trigger it.
When creating a new record in my custom object the Contact record is created as expected and in addition the record update works as expected.
If I for example uploads several records to my new object (x creates) my flow execudes, unfortunately instead for creating x numbers of new different Contacts it creates x numbers of similar Contacts.
A client of one of our web service written in Apex reported an error. It turns out there was an error --
Insert failed. First exception on row 9; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusie access to this record: 
I'm trying to think of what would cause an lock problem on an insert. The method does to a start transaction and then inserts a row in Opportunity and then several in OpportunityLineItem.
I don't see how the problem could be with the row being inserted. Could it be with something locked a parent record like account? Could something have already read the Opportunity record while the OpportunityLineItem records where being written?