I’m getting a System.InvalidOperationException: Recursive locks not allowed when doing a SaveAndPublish from code. I think it has something to do with the ContentCache.
I’m sending individual items to my Umbraco site API which then Publishes the item. The API can receive over 100 items in quick succession. The API controller is async.
The first couple of items get published correctly, all the others look like they’re published in the CMS but show ‘This document is published but is not in the cache’ when trying to view the URL. I also have many log entries for the Recursive locks not allowed error.
Is it something to do with a lock not being released before another SaveAndPublish is attempted?
Should I make the endpoint take a list of items rather than a single item?
This import is due to be run every night fyi and I’m using Umbraco 13.
Any help is greatly appreciated.
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/114950-systeminvalidoperationexception-recursive-locks-not-allowed