Multisites and Apache Vhosts with Project Mercury

The Mercury stack uses Tomcat6 as the servlet container for Solr. This is configured out of the box to run a single site. If you want to use multisites or vhosts for multiple drupals on one server then you will run into the following issues:

1. Memcache may have the default key set so you get cache collisions
2. Apache solr instances are configured for one site so if two sites both attempt to update the index at /solr then both sites will be searchable from the other, which is probably more confusing than anything

Point 1 Memcache collisions
This is solved by giving each drupal instance its own unique key it can use to prefix the variables with. So instead of multiple sites each attempting to rewrite the same variable they would each write a unique prefix for the variable thereby allowing more than on instance to use the same cache. To achieve this add the following to settings.php

$conf['memcache_key_prefix'] = 'unique_key';

So the whole section may look something like this:

$conf['cache_inc'] = './sites/all/modules/memcache/memcache.inc';
$conf['memcache_key_prefix'] = 'unique_key';
$conf['memcache_servers'] = array(
         '127.0.0.1:11211' => 'default',
         );

2. Multi-core Apache Solr
This entails creating a search index for each site inside the solr instance. Follow the tutorial here http://drupal.org/node/484800 but be aware that solr is located in /var/solr

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.