Hi guys,

I am using Apache Solr with Drupal 7. It's been installed on this site for about 5 months and suddenly last night we started seeing these errors in the admin pages.

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1363: parser error : Premature end of data in tag stats line 1329 in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1363: parser error : Premature end of data in tag entry line 1316 in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1363: parser error : Premature end of data in tag CACHE line 1314 in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1363: parser error : Premature end of data in tag solr-info line 29 in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1363: parser error : Premature end of data in tag solr line 21 in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in DrupalApacheSolrService->setStats() (line 195 of /afs/asu.edu/it/drupal/qa/wsi/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).

Any ideas? from the research i've done, a lot of people suggest it's a core issue in the common.inc file with feof, but d7 isn't using that any more and all those issues were for d6.

This doesn't break my site, solr works fine and retrieves results fine, so it's not critical, but it is certainly odd.

CommentFileSizeAuthor
#7 1599310-stats.patch1.34 KBpwolanin

Comments

pwolanin’s picture

Please look at the actual XML - maybe the stats.jsp page is timing out?

dpalmer’s picture

Yes, the stats.jsp page is timing out.

pwolanin’s picture

Do you have a very large index or a lot of cores?

nick_vh’s picture

Category: bug » support
dpalmer’s picture

Yes, these indexes contain over 250,000 records.

nick_vh’s picture

Priority: Major » Normal

Not major

pwolanin’s picture

Priority: Normal » Major
Status: Active » Fixed
StatusFileSize
new1.34 KB

If you are willing to rebuild Solr, you can patch stats.jsp to return only the info Drupal needs. That's the work-around we've had to use in production for Solr with many cores.

You may use the attached patch for Solr 1.4 under the terms of the Apache Software License 2.0. More or less the same works for Solr 3.5.

dpalmer’s picture

Thanks guys

nick_vh’s picture

Status: Fixed » Closed (fixed)