Cannot connect to the database: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No address associated with hostname

Here is the error I found from the logs :

2017/03/28 12:41:31 [error] 2443#2443: *191751 FastCGI sent in stderr: “PHP message: Error in Piwik: Cannot connect to the database: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No address associated with hostname This may be a temporary issue, try refreshing the page. If the problem persists please contact your Piwik administrator” while reading response header from upstream, client: 106.51.22.185, server: analytics.admavin.com, request: “POST / HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.0-fpm.sock:”, host: “analytics.admavin.com”, referrer: “https://analytics.admavin.com/

We are running the piwik server behind Nginx and it stopped working all of a sudden.
Note: There are other services running in the same machine which are able to connect to the db successfully.

Any sort of help is appreciated.
Thanks

Can some one please help with this?
Our production release is blocked by this… :cry: :weary:

Cannot connect to the database:

looks like this is the problem, your piwik cannot connect to the database

so, this used to work and stopped out of nowhere :slight_smile: Precisely, it used to connect to the database. We have been using this setup for last couple of months.

Edit : It happened after updating to V3.0.2