Remove old page versions Job

Permalink
Hello,

After running the remove old page versions job. The job keeps running for hours / days(does not seem to stop). This problem is occurring on Concrete 5.6.3.3 and on 5.7.4.2.

There are no erros in the Concrete logbook. How can I get this working properly again?

1 Attachment

 
jasteele12 replied on at Permalink Reply 1 Attachment
jasteele12
Hi Rik,

Does anything show up in your php error log? Do you have a really slow MySQL host?

I'm attaching a tools script (place it in tools/remove-old-versions.php) and call it like this repeatedly: http://yoursite.com/tools/remove-old-versions... (not no .php extension).

It will only keep the last 2 versions (you can change this on line 14 KEEP_VERSIONS define).

I have no idea if this will work with 5.7, but certainly does for 5.6

Let me know how it goes, John
mhawke replied on at Permalink Reply
mhawke
There is a URL at the bottom of the Jobs page. If you paste that URL into your browser, does it give you any better information? If you want to simplify this output so it only reports the results of the 'Remove Old Versions' job, you can edit the 'Default' job set so it only includes that one job.
rge replied on at Permalink Reply
Thanks for the replies. Using the Job url fixed the problem for the 5.7 website. The 5.6 seems to be resolved by itself. I was unable to recreated the problem. Only one site still gives problems.

When removing the page versions via the automated jobs the server sometimes crashes. This also happens in my local environment (MAMP). The error that I found was
mysql server has gone away
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [2006: MySQL server has gone away] in EXECUTE("SELECT TABLE_NAME, CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=SCHEMA()") ' in /Users/Rge/Documents/htdocs/2015/sitename/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php:78 Stack trace: #0 /Users/Rge/Documents/htdocs/2015/sitename/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(1074): adodb_throw('mysqlt', 'EXECUTE', 2006, 'MySQL server ha...', 'SELECT TABLE_NA...', false, Object(ADODB_mysqlt)) #1 /Users/Rge/Documents/htdocs/2015/sitename/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(1049): ADOConnection->_Execute('SELECT TABLE_NA...', false) #2 /Users/Rge/Documents/htdocs/2015/sitename/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb.inc.php(2334): ADOConnection->Execute('SELECT TABLE_NA...') #3 /Users/Rge/Documents/htdocs/2015/sitename/updates/concrete5.6.3.3/concrete in /Users/Rge/Documents/htdocs/2015/sitename/updates/concrete5.6.3.3/concrete/libraries/3rdparty/adodb/adodb-exceptions.inc.php on line 78


Local I increased the max_allowed_packet up to 200. After this I was enable to remove the page versions. My hosting provider advised me not to increate the allow packets up to 200 on the online server. Because of the performance hit when allot of visitors visit the site. On the server max_allowed_packet is set to 64.