Report this

What is the reason for this report?

Name or service not known

Posted on December 23, 2018

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] php_network_getaddresses: 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.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

Cheers

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.