Enabling WooCommerce Analytics results in Error 505

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:, 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?


Hi @RickNL ,

This error seems to be the limitation with post size in your webs server, could you please try to increase and check if it works.

Hi Karthik,

Thanks for your reply!

What limitation should I use? The post_max_size on the site with WooCommerce is 128MB. On the server where Matomo runs it’s 256MB.

Is the website sending or receiving that much data when logging cart actions?

Can not give you concrete size in this case, I would recommend you try little higher than the current size. for example: 512MB

Hi Karthik,


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.

Unfortunately, the error persists. :frowning:

Hi Rick,

Thanks for the reply.

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:

    fastcgi_buffers  16 16k;
    fastcgi_buffer_size  32k;

And if the same error is seen, increasing the values further would be the next step.

Could you give this a try and let us know if it resolves the issue?

1 Like