First time here? Check out the FAQ!
4

How can i run multiple instances of askbot on a server?

Currently I'm successfully running a askbot instance site.com. When I try to install the second instance at site2.com, site2.com and site.com gets content from each other randomly despite having a different databases and configs. I use virtualenv for setting up askbot on both sites using pip.

Server Environment: Nginx, Mysql, uWSGI, Python 2.6

I use this script for starting uwsgi as service, http://goo.gl/nI7Em

I use this config in nginx, https://gist.github.com/427eace448b71461755c

site.com = http://goo.gl/GN3Fv

site2.com = http://goo.gl/VgWpe

Difference beetween the two sites is, site2.com doesn't have any question whereas site.com have one question "How're you today?". If you refresh them both randomly, my issue can be regenerated, i.e the question will randomly appear on both sites.

naavi's avatar
185
naavi
asked 2012-06-23 16:49:21 -0600, updated 2012-06-24 00:50:28 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

The issue is due to cache "mixups" between the sites.

edited: with Django 1.3 you could try setting up CACHES settings variable and add distinct KEY_PREFIX value to all of your sites.

For example:

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': 'unix:/tmp/memcached.sock',
        'KEY_PREFIX': 'siteA',
    }
}

That way caches will be differentiated between sites and you can host several on the same server.

Evgeny's avatar
13.2k
Evgeny
answered 2012-06-23 17:59:37 -0600, updated 2012-07-21 21:13:29 -0600
edit flag offensive 0 remove flag delete link

Comments

I'm not sure how to have separate cache engines.

naavi's avatar naavi (2012-06-24 01:24:40 -0600) edit

@Evgeny : about multi-site implementation, did you already documented what you plan to implement ? It also need this features asap so I can contribute on this point

Alban's avatar Alban (2012-06-26 03:10:51 -0600) edit

@Evgeny Is it possible to rectify this issue at the earliest? Will donation help to accelerate? If yes, what amount?

naavi's avatar naavi (2012-06-28 23:10:35 -0600) edit
2

@rovni, thanks! Please save your donation for something else:). I will fix this tomorrow.

Evgeny's avatar Evgeny (2012-06-29 00:08:42 -0600) edit
add a comment see more comments