Running on two drupal installations ?

gdtechindia - March 25, 2008 - 09:14
Project:Memcache API and Integration
Version:5.x-1.7
Component:Miscellaneous
Category:support request
Priority:minor
Assigned:Unassigned
Status:closed
Description

Hi,

I am having a small issue. We have one instance of memcache on our dedicated server.

We are running two different drupal websites which aren't connected.

http://www.site.com
http://www.site.com/subcat

Should we run two instances of memcache or only one will help.

Thanks in advance.

#1

jamesJonas - March 25, 2008 - 23:47

I have the same question. After installing a second instance to act as a sandbox I was seeing admin properties switching to first installation. Very strange. Dropped memcache for the second installation (sandbox) until I understand the problem a bit more. I

#2

slantview - March 25, 2008 - 23:50
Priority:critical» minor
Status:active» fixed

There is a documented feature of memcache to do "prefixing" per site.

From the instructions on the project page and README.

Prefixing

If you want to have multiple Drupal installations share memcached instances, you need to include a unique prefix for each Drupal installation in the $conf array of settings.php:

<?php
$conf
= array(
 
'memcache_key_prefix' => 'something_unique',
);
?>

#3

firebus - March 26, 2008 - 00:01

you can prefix, but as i understand it, you're going to flush everything for site 2 whenever you flush for site 1 and vice-versa.

drupal does a lot of cache_clear_all with wildcards, and since memcache can't support wildcards, you get a lot of full cache flushes.

better to have separate memcache instances for each site.
best to have separate memcache instances for each cache (cache_page, cache_menu, etc.)

#4

slantview - March 26, 2008 - 00:38

you're absolutely correct. you will see extremely low hit rates if you have views and cck turned on using the same "bins". This will be even worse running two sites.

#5

jamesJonas - April 1, 2008 - 00:23

Thanks for the options. Right now the second site is in sandbox mode, so it is a good time to try some alternatives.

#6

Anonymous (not verified) - April 15, 2008 - 00:31
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.