1

I'm working on a store with about 80,000 skus, on a quad-core dedicated server with 12GB ram and applying a Catalog Price Rule is just not working for some reason. No discounts show, even after i've done the following:

  • Create Rule
  • Status: Enabled
  • Customer Groups selected
  • From/To Dates created
  • No Conditions set (sitewide)
  • Actions - apply percentage of original price, 20 percent
  • Click "Save & Apply

After a good 5 minutes, i'll get the green notification saying the rule has been applied. I'll then proceed to flush Cache and also Re-Index. Proceeding to view the site on the front-end, It's as if nothing ever happened. Not a template issue because it's worked previously.

I was assuming it may have to do with Cron not being executed yet, so i manually have accessed Cron.php in my web browser- which hangs and eventually gives the entire site a 503 error which lasts for a couple minutes and goes away.

I've tried everything from upping Memory Limits in PHP / MySQL settings and Max_Execution_Time, and I'm at my wits end as I just can't get this to work.

Any clues?

  • 1
    Start by increasing your amount of RAM. 12GB is not enough for a catalogue of that size, you should have 16GB minimum, 32GB ideally. – Ben Lessani - Sonassi Nov 26 '14 at 0:08
1

cron.php should never be executed via HTTP, even exposing it to the internet is a potential DOS target.

Your cron should only ever be executed via CLI using the cron.sh wrapper,

  • It ensures it wont run multiple times (and commence the same process repeatedly).
  • It will allow you to better control PHP memory allocation (ie. more for CLI, less for web), to reduce the risk of an OOM (out of memory) condition
  • Any error messages will be printed to screen (rather than a vague 503 error)
  • It prevents thread hogging and resource wastage on your web server
|improve this answer|||||
  • Got it. Would you say that catalog price rules not applying could be that it's waiting for Cron to run on the scheduled task? Shouldn't they apply right away? – Joe Nov 26 '14 at 0:25
  • Possibly. The cron is only really used for the reapplication of rules (or expiration of), not so much for the initial application - that's what the button in the upper right corner is for in the rule management section. I was just wanting to give a little guidance on cron best practice. Its worth installing this extension to have some visibility over what task in particular is making your cron slow. With regards to your pricing rules - check the table in the DB, if its populated correctly, your issue is indexes/cache etc. (ie. debug further) – Ben Lessani - Sonassi Nov 26 '14 at 0:38

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.