- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Error 500 when FPC is enable
Hi,
I've that error when FPC is enable; problem is only on specific category and with configurable product.
On server I've this error
[Wed Sep 11 17:07:55.569817 2019] [core:error] [pid 42702:tid 47406966220544] [client 2.233.130.127:54178] Premature end of script headers: index.php
But server configuration is ok.
Any idea? I use Magento 2.3.2
Thanks so much
Matteo
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error 500 when FPC is enable
Hi @Paride Fontana,
Just a few questions to try to get a better idea:
- Are you running on developer mode?
- Is that the only error you get?
- Maybe the webserver error log can provide more information?
- What about the Magento's logs?
- Which version of PHP are you using?
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error 500 when FPC is enable
Hi @Damian Culotta,
thanks for your answer:
- Yes
- Yes, and only in a specific category with specific product
- Webserver log: [core:error] [pid 62443:tid 47406966220544] [client 2.233.130.127:52100] Premature end of script headers: index.php
- Nothing, no error about this
- 7.2.22
Thanks so much
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error 500 when FPC is enable
Hi @Paride Fontana,
Is that category using 3rd-party or custom modules?
Not sure if this is related but in the last days I saw some similar errors with PHP 7.2 because some sections of PHP code withe the close and open tag.
I mean:
<?php // some code here ?> <?php header('location: new_url.com'); // line 6 throws an error because PHP sent a response body for line 4 ?>
What if you downgrade to PHP 7.1 to be sure is not related with the PHP version and some part of the code?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error 500 when FPC is enable
Hi,
yes there are third part extensions but I disable all and problem remain.
I've downgrade the PHP version to 7.1 and 7.0 but I've the same error.
I haven't other ideas?
Thanks so much
Matteo Fontana
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error 500 when FPC is enable
Its an error documented here:
https://github.com/magento/magento2/issues/6401
https://github.com/magento/magento2/issues/26960
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error 500 when FPC is enable
can you check and confirm the followings
1. Check this error in the Magento Luma theme
2. Check this error by disabling all 3rd party modules
3. FPC Settings ( files / redis / varnish ) ?
4. Is there any customization related to the session into any block/plugin/template for that page?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error 500 when FPC is enable
A bit late here but I got 500 error on my website.
After hours investigation I found that
Content-Security-Policy
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!