Monthly Cron error

On my new VPS I get the following error while going to https://my_site/cron/monthly/

How to solve?

Thank you

Fatal Error.

An exception occurred while executing 'ALTER TABLE elgg_system_log_1627605221 engine=archive':

SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown storage engine 'archive'

QUERY: ALTER TABLE elgg_system_log_1627605221 engine=archive

  • I think Jerome might have mixed up the history of changes of the Elgg log and Logrotate plugin. The option to delete archived log tables via cron was indeeed added before Elgg 3 already. But I think it never worked on Elgg 2. On Elgg 3 the Logrotate plugin was merged with the formerly Elgg core functionality of the Elgg log stuff into the new bundled System_log plugin. If I remember correctly, the deletion of archived tables still didn't work at the beginning but was then fixed at some point in some Elgg 3.x version. As Elgg 2 was already in LTS mode at that time it wasn't fixed in Elgg 2 anymore though (as Elgg 2 would now get only security related fixes).

    As Jerome mentioned, you can simply delete the archived log tables from the database (e.g. with PhpMyAdmin). Just do NOT delete the Elgg log table as Elgg needs this table to be present to work!

    You might have asked yourself for what you would need the Elgg log entries at all. If your answer is the same as mine (I NEVER needed the Elgg log table entries in more than 10 years even once!), you could consider using the No Logging plugin (https://elgg.org/plugins/1441338).

    The No logging plugin stops new entries being added to the log table. After the log rotate cronjob had been run twice (or once if you select a shorter interval at the right time) the log table will contain 0 entries and no new entries are added. If this is the case, you can deactivate the Logrotate plugin as it has no purpose anymore, delete any archived log tables from the database and there won't be any new archived tables created as long as you have the Logrotate plugin disabled (which you wouldn't need when the No Logging plugin keeps new Elgg log entries from being added to the database).

    As I said, do NOT delete the log table even then as Elgg would still stumble about the table missing even with no new entries being added to that table.

    The Garbagecollector plugin is something different and has nothing to do with the logs. The garbagecollector cronjob added by the Garbagecollector plugin optimizes the tables of the database and removes certain entries no longer in use to keep the database smaller.

  • Thank you iionly.

    I'll follow your detailed and clear explanation and let the the archive tables disappear.

  • Thank you iionly.

    I'll follow your detailed and clear explanation and let the the archive tables disappear.