Hi, we are installing Matamo behind an AWS Load Balancer. The load balancer is in a DMZ subnet that, by default, has no access to the Internet. Pulled my hair trying to figure out why I was getting 504 Gateway Timeouts, figuring there was something wrong with my load balancer or target group configurations.
In a “well duh!” moment I figured out Matomo needs Internet access (which was available during installation but subsequently disabled when we “tightened down” the environment). Disabling internet features as documented at https://matomo.org/faq/troubleshooting/faq_16646/ mitigated the issue, at least until the powers-that-be determine whether we want to allow the Matomo installation access to the Internet.
Here’s the ask: Implement a default CURL timeout, preferable less than 60 seconds, and explicitly throw a “can’t get to the Internet resource” kind of error if there is a CURL timeout. This would be a lot easier to troubleshoot than a 504 coming from Apache/NGINX or upstream in a scaled environment. We could then look to see if there is a firewall, DNS, etc. issue as opposed to looking in the wrong direction (is PHP blocked from the database, etc.)