1

On our Magento 1 store log cleaning is not working, even though we have Enabled Log Cleaning in System > Configuration > Advanced > System.

Also, when I run php -f shell/log.php clean from the terminal it does not work either and gives no error messages.

$ php -f shell/log.php clean
Log cleaned

Our site is hosted on AWS with a seperate webserver & mysql server. Could it have something to do with this? Although, all other webserver DB interactions are working fine.

I could find no error messages in our system & exception logs.

What else could it be?

1

Try this answer which worked for me: Log Cleaning does not work

php -f log.php -- clean --days 1
0

This is because the cleaner depends on information in log_ tables to be related to report_event so it doesn't just do a delete from across every table, something like this:

sendto(4, "\370\0\0\0\3SELECT `event_table`.`event_id` FROM `report_event` AS `event_table`\n LEFT JOIN `log_visitor` AS `visitor_table` ON event_table.subject_id = visitor_table.visitor_id WHERE (visitor_table.visitor_id IS NULL) AND (event_table.subtype = 1) LIMIT 1000", 252, MSG_DONTWAIT, NULL, 0) = 252
sendto(4, "{\2\0\0\3DELETE FROM `report_event` WHERE (event_id IN('39848474', '39848475', '39848476', '39848477', '39848478', '39848479', '39848480', '39848481', '39848482', '39848483', '39848484', '39848485', '39848486', '39848487', '39848488', '39848489', '39848490', '39848491', '39848492', '39848493', '39848494', '39848495', '39848496', '39848497', '39848498', '39848499', '39848500', '39848501', '39848502', '39848503', '39848504', '39848505', '39848506', '39848507', '39848508', '39848509', '39848510', '39848511', '39848512', '39848513', '39848514', '39848515', '39848516', '39848517', '39848518', '39848519', '39848520', '39848521', '39848522'))", 639, MSG_DONTWAIT, NULL, 0) = 639

So if there isn't a corresponding row in the log_ tables you can see report_event slowly inflate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.