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)
Comment | File | Size | Author |
---|---|---|---|
#3 | 1340244--elaborate-exception-messages-1.patch | 463 bytes | alanom |
#1 | 1340244--elaborate-exception-messages-1.patch | 461 bytes | drunken monkey |
Comments
Comment #1
drunken monkeyAh, 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?
Comment #2
drunken monkeyComment #3
alanom CreditAttribution: alanom commentedGreat! 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.
Comment #4
drunken monkeyOops, 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.
Comment #6
_wdm_ CreditAttribution: _wdm_ commentedBecause 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)