November Happy Hour will be moved to Thursday December 5th.

90.000 versions of Pages in database

Vote:
 

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:

SELECT 
COUNT(*) as nrofversions, fkPageID, tblWorkPage.Name
	FROM 
		tblWorkPage 
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?

#62573
Oct 30, 2012 9:45
Vote:
 

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. 

 

 

#62574
Oct 30, 2012 10:39
Vote:
 

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.

#62576
Oct 30, 2012 10:42
Vote:
 

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?

#62577
Oct 30, 2012 10:48
Vote:
 

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.. :)

#62579
Oct 30, 2012 10:52
Vote:
 

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.

#62580
Oct 30, 2012 10:52
Vote:
 

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

#62581
Oct 30, 2012 10:55
Vote:
 

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?

#62582
Edited, Oct 30, 2012 10:55
Vote:
 

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

#62583
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.