I've just had a bit of struggle finding out the hard way that the rather unfriendly error message below, which pops up in a dsm() block and leaves nothing in the error log, comes from Search Api Solr Search, via the SolrPhpClient library, and means that the Apache Solr server has gone offline (in my case because of a memory failure):

'-111' Status: Unknown Status

It'd be great if these connection errors, such as this one thrown from the php client itself (HttpTransportException.php line 65) and also the ones in solr_connection.inc (lines 93 and 118) could have some string prepended so we know where they're coming from. Drupal sites typically have lots of components, and it'd help a lot if e.g. these errors looked more like this:

Solr Search connection error ('-111' Status: Unknown Status)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drunken monkey’s picture

Ah, yes, good idea. Thanks!

I think we can catch all these at a single location (I can't change the SolrPhpClient classes anyways) – does the attached patch help?

drunken monkey’s picture

Status: Active » Needs review
alanom’s picture

Great! Can we add that it's a connection error, or is that not necessarily true?
p.s. that's one close bracket too few - patch attached.

drunken monkey’s picture

Status: Needs review » Fixed

Oops, thanks!

And no, I don't think it's necessarily true that it's a connection error. Could be a Solr configuration error too, for instance.

So I committed your patch above. Thanks again, and feel free to post other suggestions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

_wdm_’s picture

Because of how I am using views I am seeing each error several times.
I have a tiny change I think would improve the error display.

In search_api_views/includes/query.inc (218)

- drupal_set_message($msg, 'error');
+ drupal_set_message($msg, 'error', FALSE);