Link to home
Start Free TrialLog in
Avatar of William Nettmann
William NettmannFlag for South Africa

asked on

Sphinx Search Fails with Error: "connection unexpectedly closed (timed out?)"

I am a total beginner at this, so please forgive me if this is a dumb question.

I am using the "sphinxapi.php" API to search through about 400,000 WordPress posts.

Some search terms always succeed (e.g. "wheelbarrow" or "employee") but others always
fail (e.g. "worker" or "wood"). All terms are included in the documents.

When the search fails, a PHP error is thrown:

<b>Notice</b>: fwrite(): send of 8192 bytes failed with errno=104 Connection reset by
peer in
<b>/home/caselaw/domains/dev.caselaw.tk/public_html/wp-content/plugins/caselaw/sphinxapi.p
hp</b> on line <b>486</b>

Open in new window


Around line 486 in sphinxapi.php is the following code (starting line 485):

function _Send($handle, $data, $length) {
        if (feof($handle) || fwrite($handle, $data, $length) !== $length) {
            $this->_error = 'connection unexpectedly closed (timed out?)';
            $this->_connerror = true;
            return false;
        }
        return true;
    }

Open in new window


How can I even start finding out what is going on?

My dev site is at http://dev.caselaw.tk/search-page/. I am trying to get simple
searches work first, without using the Courts, Categories and Ratings filters on the form.
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

What is your server's PHP time out limit set to?
ASKER CERTIFIED SOLUTION
Avatar of William Nettmann
William Nettmann
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of William Nettmann

ASKER

Found the solution myself, with suggestions from elsewhere.