Я получил эту ошибку в Сфинксе.
{"status":"failed","status_message":"failed to read searchd response (status=2613, ver=11829, len=774975488, read=66)"}
PHP-файл >> Я использую этот учебник
<?php
require_once('sphinxapi.php');
$sphinxClient = new SphinxClient();
$sphinxClient->SetServer( 'localhost', 3306 );
$sphinxClient->SetConnectTimeout( 1 );
$sphinxClient->SetFieldWeights(array('title' => 70, 'body_text' => 30));
$sphinxClient->SetMatchMode( SPH_MATCH_EXTENDED2 );
$sphinxClient->SetLimits( 0, 20, 1000 );
$sphinxClient->SetRankingMode( SPH_RANK_PROXIMITY_BM25 );
$sphinxClient->SetArrayResult( true );
$searchQuery = "SELECT title FROM `documents` WHERE 1";
$searchResults = $sphinxClient->Query( $searchQuery, '*' );
$jhash = array();
if ( $searchResults === false )
{
$jhash['status'] = 'failed';
$jhash['status_message'] = $sphinxClient->GetLastError();
}
else
{
if ( $sphinxClient->GetLastWarning() )
{
$jhash['status'] = 'warning';
$jhash['status_message'] = $sphinxClient->GetLastWarning();
}
else
{
$jhash['status'] = 'good';
}
$jhash['result_total'] = $searchResults['total'];
$jhash['result_found'] = $searchResults['total_found'];
$jhash_matches = array();
if ( is_array($searchResults["matches"]) )
{
$row_ids = array();
foreach ( $searchResults["matches"] as $docinfo )
{
array_push($row_ids, mysql_real_escape_string($docinfo['id']));
}
}
$jhash['matches'] = $jhash_matches;
}
echo json_encode($jhash);
?>
Есть идеи о причине проблемы?