-
Notifications
You must be signed in to change notification settings - Fork 9.4k
X-Magento-Tags Header too long - Apache / PHP error 500 on category pages #26960
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
Comments
Hi @marvinhinz. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @marvinhinz do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
This is strongly related to #6401 and is probably a duplicate. |
I also faced the same issue and its due to long headers... |
I can confirm, this can still be an issue with Magento 2.4.0 |
Hi @ihor-sviziev. Thank you for working on this issue.
|
Hi @marvinhinz, |
I can reproduce this in 2.3.5-p1 |
In order to have fully functional fix for all cases - we should introduce some tags splitting mechanism. There was one trial to do that in #12831, but it wasn't finalized. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions! |
I have the same issue when getting large search results in Magento 2.4.1. Is there a fix for it? I tried the one in the description, and it worked. |
Seems to be fixed on the latest 2.4-develop. Preconditions: Multiple Store views Tested with Add Store Code to URL enabled and disabled Manual steps: Checking the var/log/apache2/ error logs Result: |
@ihor-sviziev It´s only a workaround! But after all, better than a 503! |
I edited my comment because I accidentally copied the wrong line :( |
I do some logging and found a very large 'X-Magento-Tags' header entry:
|
I think the problen are the Upsell Products, We have some products with over 400 Upsell Products. I am trying to limit this and check again. |
Hi @engcom-Alfa. Thank you for working on this issue.
|
Hi @marvinhinz, Tried reproducing the issue on Magento 2.4 Develop. we are not able to reproduce the error, it works as expected. produced tags: cat_c,cat_c_38,cat_c_20,cat_c_11,cat_c_3,cat_c_9,cat_c_37,store,cms_b,cms_b_1,cms_b_footer_links_block,cat_c_23,cat_c_p_23,FPC Kindly suggest how to make too lengthy tags to reproduce this issue. |
There has no update from reporter and it has been 14 days. Hence closing the issue. Thanks |
@engcom-Delta Please re-open this issue, it still persists in magento 2.4.2-p1. Will retest in latest magento, once we have updated the customer. It happens on catalogsearch result page with >1000 results. Debug changes in magento/vendor/magento/framework/App/Http.php We have a workaround for nginx, but the error happens in apache and we could not find a matching option. |
Hi @engcom-Delta. Thank you for working on this issue.
|
We only have this problem with simple porducts which are included in more than about 250 bundle products. |
@engcom-Delta could you try with catalogsearch results > 1000? |
Okay thank you, it might be related with elasticsuite module. I'll try to reproduce and get back to you. |
We have noticed that this issue has not been updated for 14 Days. |
@marvinhinz: did you ever figure this out, or have a workaround for this? |
A bit late here but I got same error on my website. After hours investigation I found that
Header size is above 8KBs where as it is limited to 8 in nginx and apache2. For the solution, I removed all the duplicate and not needed CSP directives for custom module /etc/csp_whitelist.xml file and it worked for me. Thanks! |
Preconditions (*)
Steps to reproduce (*)
It seems magento creates http headers that are too long for most or some apache configurations. For me it happens when visiting a category page with many products.
PHP error log:
Expected result (*)
I can understand that these headers are important for caching, and the HTTP spec doesnt define a limit for header sizes.
But most servers do in fact implement a limit (around ~8k), so i think this is a bug that should be fixed. https://stackoverflow.com/questions/686217/maximum-on-http-header-values
Actual result (*)
In my specific case, the http response is cached by magento FPC, and returned to the client in:
magento/vendor/magento/framework/App/Http.php:122
The X-Magento-Tags heade size is 27kB. The content is made up of strings like this one:
cat_p_2611,cat_p,cat_p_2584,cat_p_2585
.If i add the following in the row after, the page works again:
$this->_response->setHeader('X-Magento-Tags', "test");
The text was updated successfully, but these errors were encountered: