I have a huge list with articles (shop with 6000 articles) and there is a timerjob that runs like every 3 hours that updates the stock on all the articles based on the stock returned from an external system (duration of timerjob: 2:30 hours).
There is also a DispForm in the shop with a custom WebPart i created that lists all the favorite articles of a user. So the WebPart fetches data from the article list and displays it.
Recently I noticed an issue that sometimes the list couldn't be displayed sometimes. After some analysis I found out that the user sometimes has no access to an article and so there is an exception thrown. But 5 seconds later the user has again permissions to read the article list item (so if he refreshes the page the problem is normally gone - on the same page/list). The problem seems to only occur when the user has many articles in the favorites list and also it doesn't seem to occur when the user is Site Collection Administrator. And it is always another article (in a list of 100 articles only 1-2 are being "locked").
I implemented some logging and it really is due to lost permissions on the article item - but nobody (at least no human being) removes the permission on the user. I also tested with the normal DispForm.aspx of an article and received the same error message:
"No item exists at … It may have been deleted or renamed by another user .."
When I disable the timerjob I mentioned in the beginning the problem is gone. So, somehow this timerjob seems to meddle with users accessing the article items. But I don't see the direct connections, the items that "lose the permission" have been updated by the timerjob normally 30 minutes ago (but job still running) and are no longer being updated. There is no kind of "lock" applied in the timerjob code to the articles. Only thing is, that SPList of articles is being instanciated and later all articles are being iterated over and updated with item.Update():
SPList articles = ...;
foreach (SPListItem article in articles.Items)
{
// get stock and update item
...
article["Stock"] = newStockValue;
article.Update();
}
Any ideas what could be the problem that the permission get sometimes temporarly lost?
(SharePoint 2010 - Feb 2012 CU)