Thread:Project:Support desk/Limit number of page revisions

Hi!

I´m running Mediawiki 1.19 with PHP 5.2.14 and Mysql 5.0.96.

This Wiki recieves a large number of automatically created/updated pages via a number of Perl/Python scripts every night, and also some manual updates. From what I can see there is no limit on the number of revisions av page can have so the database grows quite a lot, and I noticed when updating Mediawiki to 1.19, the database schema updates took av very long time because it goes through all revisions. According to the Wiki statistics we now have around 4 million page updates and I assume each has its own page revision in the database.

My question is, can I limit the number of page revisions allowed ? Can I automatically or manually purge the revisions exceeding the max number ? Can it be done per namespace ?

I looked at the deleteOldRevisions.php script but I don´t know how it is supposed to work, does it delete all revisions except the latest ?

When I do a dry-run I get this error message, so I have not been able to test it further:

Searching for active revisions...done. Searching for inactive revisions...PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in /srv/www/htdocs/wiki/includes/GlobalFunctions.php on line 2210

Any pointers on how to achieve this would be appreciated.