Content Staging Task Error "An entry with the same key already exists"

Bryan Allott asked on March 12, 2014 00:04

I've updated a product and prepared to synch the content upstream. Trying to synch the document results in a timed out exception.

Synchronization client error: Exception occurred: The operation has timed out

Viewing the details on the task gives me this stacktrace:

[ArgumentException: An entry with the same key already exists.]

System.Collections.Generic.TreeSet1.AddIfNotPresent(T item) +8860615 System.Collections.Generic.SortedDictionary2.Add(TKey key, TValue value) +146 CMSModules_Objects_Controls_ViewObjectDataSet.DisplayDataSet(DataSet ds) in c:\inetpub\wwwroot_\CMSModules\Objects\Controls\ViewObjectDataSet.ascx.cs:196 CMSModules_Objects_Controls_ViewObjectDataSet.ReloadData() in c:\inetpub\wwwroot_\CMSModules\Objects\Controls\ViewObjectDataSet.ascx.cs:373 CMSModules_Objects_Controls_ViewObjectDataSet.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot_\CMSModules\Objects\Controls\ViewObjectDataSet.ascx.cs:170 CMS.ExtendedControls.AbstractUserControl.OnLoad(EventArgs e) +136

Removing the synch task, updating the document to create a new synch task has the same result. There is nothing else in the event logs and no other clues I can think of.

Any ideas?

Recent Answers

Brenden Kehren answered on March 12, 2014 17:26

Have you tried syncing the parent first? I've had something like this before where I've had to recreate the document with a different name and sync it. Then I've went and renamed the document to the original name and it causes the same problem again. I've had to go as far as destroying the document in the recycle bin and clean up the database. I'm not sure what causes it but I get it in I'd say 1 in every 6 sites I work on. Once I do the cleanup, things work just fine. Usually waste the better part of 4 or 5 hours messing around though

0 votesVote for this answer Mark as a Correct answer

Bryan Allott answered on March 12, 2014 17:59

Ah, so there were no no parent documents (that were modified) in this case, and no children either although it did have a number of attachments. We also dumped and recreated the document at least twice with the same no-joy result. The error message was a bit misleading and we didn't come up with anything concrete.

Soo, on a wild guess we started trimming down the attachments and their respective sizes... and ... it worked. Reluctant to say correlation = causation (given the error message of "entry with same key exists") but kinda makes sense on the "operation has timed out" message.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.