私は並列httpリクエストを使用HttpRequest
しHttpRequestPool
て送信していますが、リクエストの数は最大200程度です。一部のレシーバーがオフラインになっている可能性があるためHttpRequestPool::send()
、応答が返されるまで、またはタイムアウトになるまで待機します。
使用例:
$query = "CALL GetBoardsURLS()";
$result = mysql_query($query) or die("ERROR:QUERY_FAILED 8" . mysql_error());
$pool = new HttpRequestPool();
//Add the data to the request pool.
while($row = mysql_fetch_row($result))
{
$req = new HttpRequest($row[0].'/', HTTP_METH_POST);
$req->setBody($message);
$pool->attach($req);
}
$pool->send();
私のphpエラーログでエラーが発生しますが、誰かがエラーを回避するために何をしなければならないか教えてもらえますか?これは主に、無効な宛先へのリクエストがタイムアウトしたために発生すると推測しています。これは、有効なすべての受信者がメッセージを取得し、それに応じて動作するためです。助言がありますか?事前にタイ。
**ERRORS**:
[13-Nov-2012 14:20:00 UTC] PHP Fatal error: Uncaught exception HttpRequestPoolException' with message 'Exception caused by 2 inner exception(s)' in C:\inetpub\wwwroot\DeusTesting\TimeSet.php:130
inner exception 'HttpInvalidParamException' with message 'Empty or too short HTTP message: ''' in C:\inetpub\wwwroot\DeusTesting\TimeSet.php:0
inner exception 'HttpRequestException' with message 'Timeout was reached; Connection time-out (http://sim6261.agni.lindenlab.com:12046/cap/11b23456-63bd-1c56-8692-b640ac992a76/)' in C:\inetpub\wwwroot\DeusTesting\TimeSet.php:130
Stack trace:
#0 C:\inetpub\wwwroot\DeusTesting\TimeSet.php(0): HttpRequestPool->send()
#1 {main}
thrown in C:\inetpub\wwwroot\DeusTesting\TimeSet.php on line 130
[13-Nov-2012 14:30:03 UTC] PHP Fatal error: Uncaught exception 'HttpRequestPoolException' with message 'Exception caused by 12 inner exception(s)' in C:\inetpub\wwwroot\DeusTesting\TimeSet.php:130