nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
165 stars 70 forks source link

Cloudflare + SEOmatic + Pagination issue #1405

Closed luizboaretto closed 8 months ago

luizboaretto commented 8 months ago

Describe the bug

I have an intermittent problem on some search pages (paging) some pages return error 502 Bad Gateway from Cloudflare itself (other than the default rendering) and in my logs I only see this error: 449571#449571: *363266 header already sent while sending response to client, client: XXX.YYY.ZZZ.PPP, server: site.com, request: "GET /search/?q=term&page=15 HTTP/2.0", subrequest: "/cache/blitz/site.com//_includes//action=blitz%2Finclude%2Fcached&index=703993243/index.html", host: "site.com", referrer: "https://site.com/search/?q=term&pagina=14"

Sometimes it happens on the first page, sometimes on the third... sometimes on the 15th page

By clearing the data cache, the page works again. Disabling with {% do seomatic.config.renderEnabled(false) %} also works again.

To reproduce

Steps to reproduce the behaviour:

  1. Setup cloudflare proxied
  2. create a search page and navigate page-by-page

Screenshots

Captura de Tela 2024-01-17 às 17 59 19

Versions

khalwat commented 8 months ago

So I'm not sure this is actually a SEOmatic error (though yes, I did note that this intermittent problem seems to go away if you disable rendering).

Because I think this is more likely to be a devops issue of some kind rather than an SEOmatic issue, I'm going to close it. But I am happy to continue helping you out if you post more information.

Can you find the actual error in the Craft logs? If this is some kind of origin error due to SEOmatic, or Blitz, or something else, it'll log the error in the Craft web.log

Also /cache/blitz/site.com// looks wrong to me (see the double slash).