Exception due to concurrent access to tabSeries

Dear ERPNext Community,

how do you deal with concurrent creation of documents with a counting naming series? We’re creating Purchase Orders using the API and ERPNext frequently throws Record has changed since last read in table 'tabSeries’ which is probably caused by the concurrent requests.

We could fix this by avoiding concurrent requests however this is more of a band-aid than a proper solution to the issue.

Would be great to have your thoughts on that topic.

Regards,

Patrick