502 Proxy Error When Report is Greater Than a Month

Hello, I’m new to PIWIK (supporting it) and the error mentioned in the title is what I am receiving in the console. It usually will run a report for 5 minutes and throw the error. I’ve changed PHP.INI to max_execution_time to 0 (from 300) with the same results.

Any ideas would be greatly appreciated–again, I’m new to supporting this application.

The timeout is exactly 5 minutes–I’ve looked through all of the variables and changed $timeout–still stops at 300 seconds.

Any help?