简体   繁体   中英

PHP Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: System error in file.php

Suddenly I start getting the following error:

[Sat Oct 12 19:46:55.709527 2013] [:error] [pid 30600] [client x.x.x.x:56170] PHP Warning:  get_headers(): php_network_getaddresses: getaddrinfo failed: System error in file.php on line 70, referer: http://domain.com

line 70

$header = get_headers($link);

I can guess php hit some kind of limit, but i'm not sure what. I tried increasing max client limit in apache, also tried upgrading php to 5.5.

also tried changing get_headers to

$curl = curl_init();
curl_setopt_array( $curl, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_URL => $link ) );
curl_exec( $curl );
$code = curl_getinfo( $curl, CURLINFO_HTTP_CODE );
curl_close( $curl );

That seems to be some serious problems with OS. Find out in apache error.log when these error start to appear. And then find in system logs (on windows Event viewer, on linux /var/log/syslog) what happened before.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM