On one of our sites (hosted on Acquia Cloud), the Solr Search disconnects after cron. It doesn't happen on every cron run, so it's a bit difficult to replicate.

Acquia Solr - disconnected after cron

Connection to Solr is done via settings.php variable:

$conf['apachesolr_default_environment'] = 'acquia_search_server_1';

After the cron, incorrect URL to Solr is set:

wrong URL to Solr

Re-saving the Solr settings screen resolves the issue.

UPDATE #1

I wrote a short module to work around the problem. It's probably not the solution - it should be fixed in the module itself - but it might help someone else. Code can be found here: Acquia Search Reconnect.

Possibly related issues:

CommentFileSizeAuthor
acquia-solr-url.png123.1 KBdavid.lukac
acquia-solr-cron.png105.52 KBdavid.lukac
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

david.lukac created an issue. See original summary.

david.lukac’s picture

Issue summary: View changes
david.lukac’s picture

Issue summary: View changes
david.lukac’s picture

david.lukac’s picture

Update: the issue seems to be caused by exporting Solr environment settings (which contains the URL as well). We originally didn't have that exported, because Acquia sets all those values automatically, but it probably sneaked in when we added list of content types which should be indexed to Feature export.

The incriminating code in the feature:

solr_search.apachesolr_environments.inc:15:  $environment->env_id = 'acquia_search_server_1';
solr_search.apachesolr_environments.inc:17:  $environment->url = 'http://search.acquia.com/solr/';
Stanislav Mixnovich’s picture

@david.lukac This problem is still reproduced ?
if yes, then try updating Acquia Search Multiple Indexes module https://www.drupal.org/project/acquia_search_multi_subs
I think that the problem in this module.

Also see this issue:
https://www.drupal.org/node/2365243

david.lukac’s picture

Priority: Normal » Minor
Related issues: +#2365243: Periodic issues with getting subscription data

Hi Stan, partially yes. We do use the multi-index module, but for some reason Solr still says that it's disconnected on cron run and then reconnects. Another issue with multi-index module is that when exported into a Feature, specific core values are exported, which is than messed up (overridden) when deployed to different environments (I'll update with specific error messages and values - currently @ DrupalCamp Vienna ;-).

On the other hand I haven't encountered any issues with subscription settings as described in referenced issue.
Br, D

Dane Powell’s picture

Status: Active » Closed (won't fix)

This branch of Acquia Connector is no longer supported, per the version policy on the project homepage. As such, I'm tentatively closing this issue.

If this issue still applies to a supported branch (currently 7.x-3.x, 8.x-1.x, or 8.x-2.x), please reopen and select the new target version. Thanks!