90.000 versions of Pages in database


One of our system administrators noticed that the database of one our clients had grown to 6 Gigabyte. After a small investigation we decided to change the configuration and set a limit on the max number of versions. But to initiate this, we had to write a cleanup script first. After trying to run it on our staging environment, we noticed timeouts. After doing some research the problem seems to be that there huge amounts of documents in the table: tblWorkPage for the arabic language, this query results in:

COUNT(*) as nrofversions, fkPageID, tblWorkPage.Name
group by fkPageID, tblWorkPage.Name
order by COUNT(*) desc

   nrofversions    fkPageID    Name
93673    9050    صالة سكاي تيم
93672    4194    البحث عن الرحلات
93671    14075    (اجتماعات عالمية) مع الخطوط الجوية الصينية الجنوبية
93663    10376    معلومات عن اجتماعات عالمية
93662    4209    الخطوط الجوية الكينية
93661    4208    خطوط دلتا الجوية
93660    4201    الخطوط الجوية الفيتنامية
93657    14777    خطوط زيامن الجوية
93655    10377    مطار هيثرو في لندن
93652    15274    الخطوط الجوية اللبنانية تنضم إلى سكاي تيم

The problem is that using the stored procedure: editDeleteObsoletePageVersions would take way to long to delete them.


So 2 questions:

-Is this a known error in episerver 6?

-How can we remove old those unwanted versions?

Oct 30, 2012 9:45

TableWorkPage has a lot of dependencys so removing the versions do take some time. I don't know if I would call it a known error, but more a feature that if you do not set the maxversion attribut all versions will be saved.

To remove the versions I would runt the SP in bulks. Contact EPiServerSupport as I do belive they might have a script ready for you. 



Oct 30, 2012 10:39

Thanks for your answer, but all those versions where created exactly one minute after each other, so it seems that some automatic process created them, thanks for your suggestion.

Oct 30, 2012 10:42

Well if you get versions created exactly one minute after each other that in it self gives you a hint. Is there any schedule job running every minute on the site? Are you waiting for a minute anywhere in your code, etc?

Oct 30, 2012 10:48

I have been struggeling with this problem on a previous site. The problem was an automatic script that created a new version of the page every 15 minutes.

Since the problem was a few selected pages and subpages, my approach was to export and then import the affected node/nodes (EPiServer only exports the last published version). Then I deleted the old node/nodes with a SP, editDeletePage i think it was.

Btw, this was in Epi 5, but I guess it's the same thing now.

Good luck.. :)

Oct 30, 2012 10:52

No, we have some scheduled jobs, but those have nothing to do with those specific pages, i think it's some kind of glitch in Episerver where unpublished version and date goes wrong.

Oct 30, 2012 10:52

That's sad. Well, my approach might work to remove those unwanted versions, but it won't solve the problem in the long run.

Oct 30, 2012 10:55

Could be a bug in EPi but can't say it's something I have heared of before.

Can you reproduce the issue on a vanilla site with the alloy package?

Edited, Oct 30, 2012 10:55

Reproducing is hard, because it seems that the unwanted duplication is stopped, i am investigating the content tables in the database now.

Oct 30, 2012 11:21
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.