Name or service not known

December 23, 2018 753 views
MySQL PHP Nginx Applications Ubuntu 18.04

codeHello. I have just put my Symfony application on a LEMP droplet to test. Setup went all fine, it was working fine for about 5-10 minutes and now I always get this error:

An exception occurred in driver: SQLSTATE[HY000] [2002] phpnetworkgetaddresses: getaddrinfo failed: Name or service not known

I haven't changed anything in order for this error to occur. I followed this tutorial to get it up and running.

Any help would be great.

2 Answers

I also sometimes get this error message:
An exception occurred in driver: SQLSTATE[HY000] [2002] phpnetworkgetaddresses: getaddrinfo failed: Temporary failure in name resolution

What's your DB host set to? Is the DB local or remote?

Cheers

Have another answer? Share your knowledge.