I have a self-hosted Matomo install. We recently purchased the WooCommerce Analytics plugin.
When I enable WooCommerce Analytics (Premium) on our WordPress install, hosted at Kinsta, adding products to the cart results in a 502 Bad Gateway error.
When I check the logs at Kinsta, I see this error:
*442 upstream sent too big header while reading response header from upstream, client: 212.127.231.212, server: staging-derooijfotografienl.kinsta.cloud, request: “GET /?add-to-cart=57155 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php7.4-fpm-derooijfotografienl.sock:”, host: “:39049”, referrer: “”.
Does anyone recognize this behaviour? And perhaps know a solution?
I’ve set the post_max_size to 512M on the server where Matomo is installed. That didn’t make a difference. I then put it to 768M and eventually to 1024M.
Based on the error message you’re seeing I’ll assume that you’re using an NGINX server for your Matomo?
If that is the case, such an error message can sometimes be resolved by increasing the fastcgi_buffers and fastcgi_buffers_size in your server block in your nginx conf file.
(This setting cannot be set in the location block as far as I am aware, so we need to ensure it is set in the main server block)
Depending on what the values are currently set to will determine what size it should be set to to resolve the issue. But if there are no values present then we could try setting a value such as: