Forum

Thread tagged as: Problem, Error

Site broken with getaddrinfo failure

Howdy! Less than an hour ago our site went pear-shaped with the following PHP error code in every Perch object:

Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/xxx/xxx.org/perch/core/lib/PerchDB_MySQL.class.php on line 60

An editor had been posting content earlier in the morning and said that the site looked fine after the posting was complete.

Would it be correct to assume this is a hosting provider problem? I've got a chat window open with them now but they seem to be a little busy!

If it's not a hosting problem, I don't know how to begin troubleshooting PHP/MySQL errors; is there a resource you could suggest?

Thanks!

Joel Davies

Joel Davies 0 points

  • 7 years ago

Okay, I always forget y'all are Greenwich Meanies and it's almost 9pm there.

FWIW, I did fix the problem. It did relate to hosting, but was really my fault: a week ago I deleted an out-of-date development domain via my hosting provider's control panel. Evidently that action also invalidated the initial hostname alias for my database, which I guess needs to match a domain? I don't know why it took a week to manifest as a problem.

The support guy for my hosting provider simply plugged in another valid hostname for the MySQL server and updated Perch > config > config.php

Let that be a lesson to you Perch users out there who might be using the same or similar hosting provider (Dreamhost); if you delete a dev domain you might need to also update your MySQL hostname and Perch config.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Glad you got it sorted :)