-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extreme memory usage when applying catalog rules #3127
Comments
One additional problem in these conditions, if I added more than 15 manufacturers in the same clause ( the image has 5), the rule is not processed entirely. |
Could you check this issue with different OpenMage versions? I would start first with Magento 1.9.4.5. |
I can tell you we've been carrying this problem since Magento 1.9.4.1 but it was manageable because it required approximately 2G-3G of memory. However as our needs have increased the past years we've reached the point where we reach 16G of memory and I felt it's at a point we need to debug this. We also had some workarounds of external scripts running the rules one by one and this suited us until now as well. I could try later versions probably if that would help though |
@ioweb-gr We don't have this problem and we have a catalog about the same size as yours, lots of promotions going on all the time and more complex rules than the ones you showed. How many store views do you have? We found that Try changing line #216 in Also, without a profiler (and a stack trace) we can just guess. Run that script with a profiler so we can see where the bottleneck is. |
@elidrissidev it didn't help unfortunately. @rvelhote We have only 1 store view. We have turned flat tables off quite some time ago. I will give it a shot and test your suggestion for the else condition though. Regarding the profiler I tried using blackfire but unfortunately the dump is so big that blackfire rejects it :( |
@ioweb-gr If you have flat tables turned off then it won't make a difference. In our case, we have flat tables active (because it's better for performance) with 103 store views and that code change made a huge difference when applying rules. Regarding the profiling, I suggest Xhprof if Blackfire doesn't accept the traces. Or you can use Ubench and litter your code with benchmark tags and try to narrow it down. Probably even better because it will minimize the profiler overhead. |
what if you do "manufacturer is one of (....)" instead of the way the rule is created now? |
@fballiano it's not possible it only allows is and is not |
auch sorry |
This is a different feature request alltogether hehe :) |
Preconditions (*)
Steps to reproduce (*)
e.g.
Expected result (*)
Actual result (*)
\Mage_Adminhtml_Promo_CatalogController::applyRulesAction
e.g. to simulate in a CLI script
Will yield
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 75497472 bytes) in /var/www/vhosts/example.com/httpdocs/app/code/community/Varien/Profiler.php on line 169
And it will crash until I put 16G in the limit.
The text was updated successfully, but these errors were encountered: