When we search any string from the search text box, We have encountered a 500 server error into the search result page in our live web site or search page getting blank.

When we check in logs or report, it didn't give us any errors.

When we check our server apache log file then we find below errors.

[proxy_fcgi:error] [pid 4769:tid 140509781169920] [client xxx.xxx.xxx.x:58274] Premature end of script headers: index.php, referer: example.com/catalogsearch/result/?q=pink

[proxy_fcgi:error] [pid 4769:tid 140509781169920] [client xxx.xxx.xxx.x:58274] AH01070: Error parsing script headers, referer: example.com/catalogsearch/result/?q=pink

[proxy_fcgi:error] [pid 4769:tid 140509781169920] (22)Invalid argument: [client xxx.xxx.xxx.x:58274] AH01075: Error dispatching request to : , referer: example.com/catalogsearch/result/?q=pink

Our server has apache version 2.4 , PHP 7.2 FPM and HTTP 2 protocol.

Also When we disable magento cache then it's work fine. With PHP 7.2(not using PHP-7.2 FPM) it's also work perfectly. Till I debug I found issue when php 7.2 FPM is running and looks like some issue with the proxy_fcgi module.

Any help would be appreciated. Thank You!!


1 Answer 1


You might want to look at this Github issue here. Magento is compiling a list of product IDs to send as a cache header but the header ends up being too long because the header string includes all children of each of the configured items in the result set. This was happening for us on one specific listing page, but it's really any result that has too many configured items.

I was able to fix it by making the change recommended in the last comment:

Edit vendor/magento/module-configurable-product/Model/Plugin/Frontend/ProductIdentitiesExtender.php

Comment out the line here (or the whole block):

foreach ($this->configurableType->getChildrenIds($subject->getId()) as $childIds) {
  foreach ($childIds as $childId) {
     // $identities[] = Product::CACHE_TAG . '_' . $childId;

For me this was line 40.

  • 4
    That seemed to have solved the issue for me. Alternatively you can put this in di.xml file in any custom module: <type name="Magento\Catalog\Model\Product"> <plugin name="product_identities_extender" disabled="true" /> </type>
    – Zankar
    Commented Jun 29, 2020 at 13:29
  • Zankar, I owe you big time. Just adding a simple plugin with that di.xml fixed that issue for me :) Commented Feb 9, 2021 at 12:52

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.