Hosts unreachable

My code was working just fine for a while, but now I’m gettign the following error:

Hosts unreachable: Could not resolve host:,Could not resolve host:,Could not resolve host:,Could not resolve host:

I’m using the PHP library via composer. The same code seems to working just fine on production environment.

Hi @paperpopcards, thanks for posting.

Are you using Laravel? Could your issue be related to this tweet about Laravel Forge? Potentially more info.

Update: There is a bug in Ubuntu that is breaking DNS resolution.

For others with the same issue, this fixed itself with no change to code.

I do not think my issue is ubuntu related (through I’m on ubuntu).

It was down for about 4-5 hours. While it was down, I tried changing DNS server on my machine (e.g. google DNS and open DNS), it did not fix. Also, it never went down on my production server (aws amazon linux).

1 Like

Is there any further information available on solving this beyond “I redeployed and now it works”? I am running a PHP server on runcloud and I get this error and I won’t likely be in a position to do a redeploy anytime soon.


Since posting I have found my solution, hope this helps others.

Runcloud has a default set of disabled PHP functions, one of which is curl_multi_exec. Removing this from the list will fix the error.

That is if you can enable it, because normally in shared hostings you can’t,m and you are in a deep hole of s**t. Now I have to develope the entire search engine again with another solution because hosting company won’t enable curl_multi_exec. BIG DOWNSIDE of Algolia

Hello @marcosdipaolo ! Thanks for sharing, do you have any other information about this? Did you face the same dns problem ? Do you have any log in order to help you solve this problem ?