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: app_id-dsn.algolia.net,Could not resolve host: app_id-2.algolianet.com,Could not resolve host: app_id-1.algolianet.com,Could not resolve host: app_id-3.algolianet.com

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.

Thanks

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.