##### Error
We often get `PHP Warning: socket_sendto(): Host lookup failed [-10002]: Host name lookup failure` messages. Looks like the DNS resolution fails from time to time for some reason?
>>! In T159613#3074452, @Tgr wrote:
> That error message is strangely useless but [[https://github.com/facebook/hhvm/blob/222ae58713f5ff44aba46206caf7a021c51b81be/hphp/runtime/ext/sockets/ext_sockets.cpp#L214|apparently]] HHVM returns 10000 + `h_errno` from `gethostbyname` and 1 is [[https://github.com/freebsd/freebsd/blob/master/include/netdb.h#L153|`HOST_NOT_FOUND`]]. The host is stored as an instance property, so this is probably the `LegacyHandler` equivalent of T151428.
-10002 would be:
```
# define TRY_AGAIN 2 /* Non-Authoritative Host not found,
or SERVERFAIL. */
```
Request ID: `XV609wpAAEoAAItTxNkAAADP`
Request URL: zh.wikipedia.org/w/api.php...
```name=message
[XV609wpAAEoAAItTxNkAAADP] /w/api.php?format=json&formatversion=2&errorformat=plaintext&action=query&redirects=&converttitles=&prop=extracts|pageimages|pageprops&exsentences=5&piprop=thumbnail|name&pilicense=any&explaintext=&pithumbsize=320&titles=%E8%A8%B1%E6%8C%AF%E5%BE%97&uselang=zh-tw ErrorException from line 218 of /srv/mediawiki/php-1.34.0-wmf.19/includes/debug/logger/monolog/LegacyHandler.php: PHP Warning: Host lookup failed [-10002]: Unknown error -10002
```
```name=trace,lines=10
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.34.0-wmf.19/includes/debug/logger/monolog/LegacyHandler.php(218): socket_sendto(resource, string, integer, integer, string, integer)
#2 /srv/mediawiki/php-1.34.0-wmf.19/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): MediaWiki\Logger\Monolog\LegacyHandler->write(array)
#3 /srv/mediawiki/php-1.34.0-wmf.19/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php(35): Monolog\Handler\AbstractProcessingHandler->handle(array)
#4 /srv/mediawiki/php-1.34.0-wmf.19/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\WhatFailureGroupHandler->handle(array)
#5 /srv/mediawiki/php-1.34.0-wmf.19/vendor/monolog/monolog/src/Monolog/Logger.php(637): Monolog\Logger->addRecord(integer, string, array)
#6 /srv/mediawiki/php-1.34.0-wmf.19/includes/GlobalFunctions.php(1013): Monolog\Logger->info(string, array)
#7 /srv/mediawiki/php-1.34.0-wmf.19/includes/api/ApiMain.php(1691): wfDebugLog(string, string, string)
#8 /srv/mediawiki/php-1.34.0-wmf.19/includes/api/ApiMain.php(535): ApiMain->logRequest(double)
#9 /srv/mediawiki/php-1.34.0-wmf.19/includes/api/ApiMain.php(504): ApiMain->executeActionWithErrorHandling()
#10 /srv/mediawiki/php-1.34.0-wmf.19/api.php(86): ApiMain->execute()
#11 /srv/mediawiki/w/api.php(3): include(string)
#12 {main}
```
##### Impact
6 hits in the last hour, 7 hits in the last 24 hours, not seen before that.
##### Notes
Since it's not happening frequently not reverting the train, but blocking next week's train.