1

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)

1
  • Sorry I don't have an answer to your question, but with that kind of volume I would move the data to a database and use an external list. Commented Feb 21, 2014 at 17:32

1 Answer 1

0

The way I see it, you can either focus on the problem or the solution. If you want to focus on the problem, apply the latest updates, and possibly separate the retrieval of stocks from the updating of articles to reduce the amount of time using Sharepoint objects. If you want to focus on the solution, add a second attempt to the web part. in case it fails the first time, wait for a second or two and retry. It seems to be a concurrency issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.