If Solr Suddenly Stopped Working on Your Drupal Site
Ok, so you can swear Solr was working just fine on your Drupal-powered website and suddenly it does not! You made sure nobody messed with your install and you do not believe in goblins. What to do?
Keep your cool. Here’s what may have happened.
Apache Solr module uses Drupal’s drupal_http_request() function. This is a very useful function that has numerous benefits over PHP curl library for the retrieval of information via HTTP. Simplicity, reliability and speed are just a few.
However, it has one serious shortcoming. Somebody thought it was a good idea to check if the Drupal installation can make HTTP calls at, by fetching self-generated page. If that request fails – Drupal blocks the function by setting a variable ‘drupal_http_request_fails’ in the database and then it’s all downhill from there.
So, if your Solr installation suddenly stops working for no good reason, or your FeedAPI is not bringing feed items, anymore, try clearing the flag by either issuing: variable_set(drupal_http_request_fails, false); in Drupal, or running the following command in mysql:
mysql> update variable set value='b:0;' where name='drupal_http_request_fails'; 



Comments
Resetting drupal_http_request_fails
The big thing to remember is that since Drupal is checking is it can get pages by calling self generating pages,... if the site is in maintenance mode it will fail. This has become a problem for me on development sites not retrieving feeds, and not checking for module and core updates.
I put together a module that will regularly (using cron) check if drupal_http_request_fails is set to TRUE and reset it if necessary, the Http Request Fail Reset Module.
Post new comment