I have an event reciever with ItemDeleting action, in which i try to delete an item from another list (I cant realy use cascade delet behavior here, I need to do some stuff that requires the receiver). The problem is, the code deleting the item executes for like 2 minutes, doesnt matter if I use SPListItem.Delete() or ProcessBatchData(). The receiver runs synchronously (thats actually a second problem - I can't change it to run async, which should be default...). The same code (item deleting) runs normally (fast) in a test, so I dont think there is anything wrong with it. Just posting Elements.xml of my receiver, hoping maybe this will help to see the issue:

The same code outside the receiver executes in like 2 seconds. The same is when I run SPListItem.Delete(). The list from which the item is being deleted contains about 50 items (they are in 2-level folder hierarchy) and has no event receivers of its own

1 Answer
1

I have the same issue when my list have lookup fields with restriction on delete. ULS write that web is locked. Removing restrinction from lookup field fix this issue. I just don't know if this situations is as yours.

Ok, so on the list that caused the problems I had one more lookup, to some different list (X), where the 'cascade delete' behavior was selected. Removing it actualy helps, so thanks for the tip. I just dont know why this was causing a problem, if I understand correctly - when I delete an item form X, every item on my problematic list which has a lookup to that item will be deleted as well, but nothing like this occurs in my case
– matt137Dec 18 '12 at 11:22