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

50 Price Rules, Too Many? 
 
zep007
Sr. Member
 
Avatar
Total Posts:  131
Joined:  2008-05-15
Connecticut
 

I am running 1.1.8 ( I have fixed the not logged in price rule bug ) and Im trying to apply rules in the backend.  I hit the ‘apply rules’ button and after about a minute was given the message ‘rules have been applied’.

Now, When you hit that button, are the rules running even though the browser refreshes?  A minute seems way too quick to apply all those rules…

Some of the rules have been applied, but most have not.  When I look at the database catelogrule_* tables, they do not seem to be still updating.

It seems like I can apply the rules individually (Ill thoughroly test tommorrow) but will the cron be able to create the rules each day?  Where would I start if I were to edit how long they ran, and get the price rule generation out of the cron file?

Is there a way to apply the rules via SSH?  ( I know a lot of questions..) I am open to any suggestions others may have, Thanks for your input in advance!

 
Magento Community Magento Community
Magento Community
Magento Community
 
zep007
Sr. Member
 
Avatar
Total Posts:  131
Joined:  2008-05-15
Connecticut
 

The cron job did not update the prices.  I think the best coarse of action at this point would be remove the part of the cron to auto apply the rules, to apply the rules one at a time, then set my own cron to run a php script to update the dates in the database.

Does anyone know where the file is that runs the price rules each day?  I know its not in cron.php, as there is not much in there it has to be the file that is called in one of these lines:

try {
Mage::getConfig()->init()->loadEventObservers(’crontab’);
Mage::app()->addEventArea(’crontab’);
Mage::dispatchEvent(’default’);
} catch (Exception $e) {
Mage::printException($e);
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
zep007
Sr. Member
 
Avatar
Total Posts:  131
Joined:  2008-05-15
Connecticut
 

Welp, turns out 50 price rules are NOT too many.  I am now running 61 price rules, and it takes all of 17 seconds to run.  Turns out I needed to do wome server tweaking to make this happen.

 
Magento Community Magento Community
Magento Community
Magento Community
 
zep007
Sr. Member
 
Avatar
Total Posts:  131
Joined:  2008-05-15
Connecticut
 

gulp  UPDATE

They are not all working, it appears a couple did not get applied correctly.  I tend to assume its a timeout, because most of the rules are applied correctly.  I also noticed if I apply the price rule on the individual rule page ‘save and apply’ it works properly.

I screwed around with the following settings, and set them (I think) way high:

mysql.connect_timeout 1200
default_socket_timeout 
1200
max_execution_time 
28000
max_input_time 
6600
memory_limit 
1012M

But no dice getting them to run all the way through.  So my question is this:

1) What other server / PHP / Suhosin settings could be stopping this from running all the way through?

2) Is there a way I can apply a single price rule from shell ( so I could write a cron to update daily)?

Please Help!  grrr  Ive been at this for 2 days strait....

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