Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Cron Job not clean database log tables
 
Joey H
Member
 
Avatar
Total Posts:  49
Joined:  2008-07-29
St. Louis, MO
 

Hey there,

I have been trying to get Magento to clean the log files.. I have cron.php running every 5 minutes. I also have log cleaning turned on in the Magento admin area… but the logs are not being cleaned… I have looked at the following file at /app/code/core/Mage/CatalogRule/etc/config.xml

It looks like the portion of cleaning the db logs are not defined here… are they suppose to be?

<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category   Mage
 * @package    Mage_CatalogRule
 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<
config>
    <
modules>
        <
Mage_CatalogRule>
            <
version>0.7.7</version>
        </
Mage_CatalogRule>
    </
modules>
    <global>
        <
helpers>
            <
catalogrule>
                <class>
Mage_CatalogRule_Helper</class>
            </
catalogrule>
        </
helpers>
        <
models>
            <
catalogrule>
                <class>
Mage_CatalogRule_Model</class>
                <
resourceModel>catalogrule_mysql4</resourceModel>
            </
catalogrule>
            <
catalogrule_mysql4>
                <class>
Mage_CatalogRule_Model_Mysql4</class>
                <
entities>
                    <
rule>
                        <
table>catalogrule</table>
                    </
rule>
                    <
rule_product>
                        <
table>catalogrule_product</table>
                    </
rule_product>
                    <
rule_product_price>
                        <
table>catalogrule_product_price</table>
                    </
rule_product_price>
                    <
affected_product>
                        <
table>catalogrule_affected_product</table>
                    </
affected_product>
                </
entities>
            </
catalogrule_mysql4>
        </
models>
        <
resources>
            <
catalogrule_setup>
                <
setup>
                    <
module>Mage_CatalogRule</module>
                </
setup>
                <
connection>
                    <use>
core_setup</use>
                </
connection>
            </
catalogrule_setup>
            <
catalogrule_write>
                <
connection>
                    <use>
core_write</use>
                </
connection>
            </
catalogrule_write>
            <
catalogrule_read>
                <
connection>
                    <use>
core_read</use>
                </
connection>
            </
catalogrule_read>
        </
resources>
    </global>
    <
frontend>
        <
events>
            <
catalog_product_get_final_price>
                <
observers>
                    <
catalogrule>
                        <
type>singleton</type>
                        <class>
catalogrule/observer</class>
                        <
method>processFrontFinalPrice</method>
                    </
catalogrule>
                </
observers>
            </
catalog_product_get_final_price>
        </
events>
        <
translate>
            <
modules>
                <
Mage_CatalogRule>
                    <
files>
                        <default>
Mage_CatalogRule.csv</default>
                    </
files>
                </
Mage_CatalogRule>
            </
modules>
        </
translate>
    </
frontend>

    <
adminhtml>
        <
translate>
            <
modules>
                <
Mage_CatalogRule>
                    <
files>
                        <default>
Mage_CatalogRule.csv</default>
                    </
files>
                </
Mage_CatalogRule>
            </
modules>
        </
translate>
        <
events>
            <
catalog_product_get_final_price>
                <
observers>
                    <
catalogrule>
                        <
type>singleton</type>
                        <class>
catalogrule/observer</class>
                        <
method>processAdminFinalPrice</method>
                    </
catalogrule>
                </
observers>
            </
catalog_product_get_final_price>
            <
catalog_product_save_after>
                <
observers>
                    <
catalogrule>
                        <
type>singleton</type>
                        <class>
catalogrule/observer</class>
                        <
method>applyAllRulesOnProduct</method>
                    </
catalogrule>
                </
observers>
            </
catalog_product_save_after>
            <
catalog_product_import_after>
                <
observers>
                    <
catalogrule>
                        <
type>singleton</type>
                        <class>
catalogrule/observer</class>
                        <
method>applyAllRules</method>
                    </
catalogrule>
                </
observers>
            </
catalog_product_import_after>
        </
events>
        <
menu>
             <
promo translate="title" module="catalogrule">
                <
title>Promotions</title>
                <
sort_order>50</sort_order>
                <
children>
                    <
catalog translate="title" module="catalogrule">
                        <
title>Catalog Price Rules</title>
                        <
action>adminhtml/promo_catalog/</action>
                        <
resource>promo/catalog</resource>
                        <
depends><module>Mage_Catalog</module></depends>
                    </
catalog>
                </
children>
             </
promo>
         </
menu>
         <
acl>
            <
resources>
                <
admin>
                    <
children>
                        <
promo translate="title" module="catalogrule">
                            <
title>Promotions</title>
                            <
sort_order>50</sort_order>
                            <
children>
                                <
catalog translate="title">
                                    <
title>Catalog Price Rules</title>
                                </
catalog>
                            </
children>
                        </
promo>
                    </
children>
                </
admin>
            </
resources>
         </
acl>
    </
adminhtml>

    <
crontab>
        <
jobs>
            <
catalogrule_apply_all>
                <
schedule><cron_expr>0 1 * * *</cron_expr></schedule>
                <
run><model>catalogrule/observer::dailyCatalogUpdate</model></run>
            </
catalogrule_apply_all>
        </
jobs>
        <
events>
            <
catalog_product_get_final_price>
                <
observers>
                    <
catalogrule>
                        <
type>singleton</type>
                        <class>
catalogrule/observer</class>
                        <
method>processAdminFinalPrice</method>
                    </
catalogrule>
                </
observers>
            </
catalog_product_get_final_price>
        </
events>
    </
crontab>
</
config>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Joey H
Member
 
Avatar
Total Posts:  49
Joined:  2008-07-29
St. Louis, MO
 

I am sure I am not the only one who has this problem!!!!

Am I ?
Joe

 
Magento Community Magento Community
Magento Community
Magento Community
 
cooper
Sr. Member
 
Total Posts:  104
Joined:  2008-03-31
 

I’ve got too!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Loic_LC
Sr. Member
 
Avatar
Total Posts:  194
Joined:  2007-12-19
Paris, France
 

Same problem here ...

 
Magento Community Magento Community
Magento Community
Magento Community
 
itchytrig
Sr. Member
 
Avatar
Total Posts:  162
Joined:  2008-10-03
UK
 

Also interested to hear more on this…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Olof
Sr. Member
 
Total Posts:  152
Joined:  2008-10-17
 

What is the name of the SQL table the logs are in?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial Web Host
Guru
 
Avatar
Total Posts:  364
Joined:  2007-11-08
Phoenix, AZ
 

You can have a look at the following maintenance script we’ve put together to periodically clean up after Magento.  The script will give you the log tables as well as the report tables that need to be truncated from time to time.

We’ve experienced as much as 500% speed increases by simply cleaning up the Magento log/report tables as well as cleaning out the var directory from time to time.

http://www.magentocommerce.com/wiki/groups/227/maintenance_script

Hope this helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sashas7777
Sr. Member
 
Avatar
Total Posts:  90
Joined:  2012-04-25
New York, USA
 

Hi,
Sometimes when you haveing issue like this better to see what error was in cron execution log.
I would recommend you take a look at the Magento Error Extension which fives ability to monitor cron and other issues with magento,
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top