Recv() failed (104: Connection reset by peer) while reading response header from upstream

The Ecommerce tab works fine for me if I stick with the standard 1-month period, but if I switch to a 1-year period, I get the following on-screen:

“Oops… there was a problem during the request. Maybe the server had a temporary issue, or maybe you requested a report with too much data. Please try again. If this error occurs repeatedly please contact your Piwik administrator for assistance.”

and the following in my nginx log:

“recv() failed (104: Connection reset by peer) while reading response header from upstream”

There is no out-of-memory error in my nginx error log so I don’t think it’s memory.

Any ideas on this?

recv() failed (104: Connection reset by peer) while reading response header from upstream

I think that simply means that the connection between nginx and php-fpm was shut down, but it could be a memory or timeout problem. Try increasing them first and see if that fixes the problem.

You could also set up cron archiving so that reports are pre-computed every hour: http://piwik.org/docs/setup-auto-archiving/

Also try with Piwik 2.13.0 beta where memory usage was improved: I would like to test early beta and RC releases, how do I enable automatic updates to use these development versions? - Analytics Platform - Matomo

Still the same error with 2.13.0

Memory has been increased to 2G

Regards,
Unreality

Same here. Same error on 2.13.0.

With 2.13.1 I got a blank page instead of a bad gateway but no change

Restart your php-fpm service and try catching the NGINX logs again for the issue having service.
You will get most probably logs for memory exhaust .
So in response check your services any hard coded memory size is there or not.