2

Background

Our site has used Google Commerce Search for a few years now. That program is being discontinued so now we're moving to Solr in our Enterprise 1.13.0.2 store. A requirement of Solr (that our implementation of GCS did not require) is to have Catalog > Inventory > Display Out of Stock Products turned on if you want to have OOS products listed in search results (we do). Enter, problems.

When cataloginventory/options/show_out_of_stock == 1

To summarize, weird stuff starts happening that does not happen otherwise. For example, tons of max execution time errors:

[11-Mar-2014 18:20:46 UTC] PHP Fatal error:  Maximum execution time of 600 seconds
  exceeded in www/app/code/core/Enterprise/PageCache/Model/Processor.php on line 483
[11-Mar-2014 18:25:42 UTC] PHP Fatal error:  Maximum execution time of 600 seconds
  exceeded in www/app/code/core/Mage/Core/Model/App.php on line 0
[11-Mar-2014 20:18:31 UTC] PHP Fatal error:  Maximum execution time of 600 seconds 
  exceeded in www/lib/Zend/Cache/Backend/Memcached.php on line 180

Memory size errors:

[11-Mar-2014 18:26:42 UTC] PHP Fatal error:  Allowed memory size of 536870912 bytes
  exhausted (tried to allocate 519577601 bytes) in www/app/Mage.php on line 826

Page Block! errors:

2014-03-11T18:54:17+00:00 ERR (3): Notice: Undefined variable: type  in 
  www/app/code/core/Mage/Page/Block/Html/Head.php on line 134
2014-03-11T18:54:17+00:00 ERR (3): Notice: Undefined variable: name  in 
  www/app/code/core/Mage/Page/Block/Html/Head.php on line 135
2014-03-11T18:54:17+00:00 ERR (3): Warning: Missing argument 1 for 
  Mage_Page_Block_Html_Head::addItem()  in 
  www/app/code/core/Mage/Page/Block/Html/Head.php on line 128
2014-03-11T18:54:17+00:00 ERR (3): Warning: Missing argument 2 for 
  Mage_Page_Block_Html_Head::addItem()  in 
  www/app/code/core/Mage/Page/Block/Html/Head.php on line 128

Question

Why would changing the display out of stock setting cause these errors?

BTW

We've absolutely confirmed that these errors happen only after the setting in question is changed to Yes, clearing cache, and reindexing. And that they do not occur when the setting is changed to No, cache is cleared and reindexed.

2
  • Just to be clear - you can leave the setting untouched (and perhaps change another), clear cache and reindex, and you do not see these errors?
    – benmarks
    Commented Mar 12, 2014 at 0:09
  • @benmarks Correct
    – nachito
    Commented Mar 12, 2014 at 1:02

1 Answer 1

1

I can't say why the max_execution_time and memory_size errors occur. I think it is some bad implementation of some feature which only is used, when the stock is used maybe? These errors are hard to debug. Somewhere is a lot of time and memory wasted and not freed. Happy digging.

But I'm sure that this errors:

2014-03-11T18:54:17+00:00 ERR (3): Notice: Undefined variable: type in www/app/code/core/Mage/Page/Block/Html/Head.php on line 134 2014-03-11T18:54:17+00:00 ERR (3): Notice: Undefined variable: name in www/app/code/core/Mage/Page/Block/Html/Head.php on line 135 2014-03-11T18:54:17+00:00 ERR (3): Warning: Missing argument 1 for
Mage_Page_Block_Html_Head::addItem() in
www/app/code/core/Mage/Page/Block/Html/Head.php on line 128 2014-03-11T18:54:17+00:00 ERR (3): Warning: Missing argument 2 for
Mage_Page_Block_Html_Head::addItem() in
www/app/code/core/Mage/Page/Block/Html/Head.php on line 128

are not in (direct) connection to the stock, but instead are mistakes maybe in some layout.xml where <action method="addItem" is used but the parameters are missing. For this error you need to check where the error occurs and what the stacktrace is.

Warning: Missing argument 2 for Mage_Page_Block_Html_Head::addItem()

is a sign for my theory.

1
  • The XML checks out and the missing parameters do seem to be in direct connection to the setting because the errors disappear/appear with the config change.
    – Emery King
    Commented Mar 11, 2014 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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