我正在尝试获取一些长时间执行的查询的结果。每个查询具有相同的结构:
@CODE (ZZZZZZ|YYYYY...) @FIELD2 YES
每个查询在 70-100 秒内成功完成(我searchd --console
用来检查它)。但是 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