1

長時間実行されたクエリの結果を取得しようとしています。各クエリの構造は同じです。

    @CODE (ZZZZZZ|YYYYY...) @FIELD2 YES

searchd --console成功した各クエリは、70〜100秒で終了します(私はそれを確認するために使用しています)。しかし、PHPコードは60秒で応答を待つために停止し、エラーを落とします

  received zero-sized searchd response 

接続が切断されたように見えますか?通常の SphinxClient を使用しています。sphinx 検索を呼び出すための PHP コードは次のようになります。

$this->client->SetServer($this->host, $this->port);
$this->client->SetArrayResult(true);
$this->client->SetWeights(array(100, 1));
$this->client->SetMatchMode($this->mode);
$this->client->SetMaxQueryTime(5000000);
$this->client->SetLimits($this->offset, $this->limit, ($this->limit > 1000) ? $this->limit : 1000);
$this->result = $this->client->Query($this->query, $this->index);

で構成されたPHP

max_execution_time = 120
max_input_time = 120

これはいくつかのシステム設定を設定することは可能ですか?そのため、スクリプトは応答をより長く待つことができますか? Debian GNU/Linux 5.0.3 Lenny を使用しています

4

1 に答える 1

3

setConnectionTimeout を設定してみましたか?

http://sphinxsearch.com/docs/current.html#api-func-setconnecttimeout


stream_set_timeout http://www.php.net/manual/en/function.stream-set-timeout.phpを設定するほうがよいかもしれませんが 、sphinxapi.php をホットワイヤして呼び出しを追加する必要があります。

于 2013-03-28T13:07:31.110 に答える