Closed (duplicate)
Project:
Apache Solr Search
Version:
6.x-1.0-rc3
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2009 at 19:42 UTC
Updated:
26 Apr 2010 at 21:38 UTC
I've had a Drupal site running apachesolr_search 6.x-1.0-rc2 that was working fine for a while. Now, most searches fail to yield any results. If I search Solr directly via its admin interface, I get results as I would expect. I do notice that I get lots of errors that look like this:
simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: ^ in /web/drupal/sites/MYSITE/modules/apachesolr/Drupal_Apache_Solr_Service.php on line 97.
I also notice that in admin/reports/apachesolr it says there are 2450 documents in the index but then the number of terms in index is blank and it says there's no data on indexed fields.
Here's what I've tried:
I'm stumped. How can I debug this?
Comments
Comment #1
slnm commentedOh, and I've deleted the records, dropped the index, reloaded records and rebuilt the index several times.
Comment #2
pwolanin commentedOdd - you need the parsed xml generally to analyze the search results.
Could be a PHP problem - do you have an opcode cache?
Comment #3
slnm commentedThere's no Opcode cache in the broken system.
I'd appreciate suggestions on how to debug this further.
Comment #4
pwolanin commentedwell this comment:
makes me suspicious of some unaccounted local change.
Comment #5
slnm commentedThis ends up not being an Apache Solr Search bug after all.
One of the senior developers in our organization tracked the bug down to a bug in core Drupal where drupal_http_request uses fread, which only reads 8K and terminates. The developer identified the following piece of code as problematic, even if he changed the value of 1024 to something much larger. The documented limit from fread is 8192 and this causes problems getting data from Solr that's larger than 8k.
Here's the problematic piece of drupal_http_request code:
And, here's the replacement that solves our search problems:
It's also interesting to note that we saw symptoms of this bug:
http://drupal.org/node/307879
which went away when we locally patched Drupal core.
I'll be filing a bug against core and pointing this bug to it so please leave this bug open for a few days.
Comment #6
pwolanin commentedThanks for the investigation - this is certainly an important finding.
Comment #7
David_Rothstein commentedIt looks like #617126: drupal_http_request() fails is related to this?
Comment #8
jpmckinney commentedMarking duplicate of #589580: Lot of errors on Search Index page.