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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
naavi's avatar
185
naavi
asked 12 years ago, updated 12 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago, updated 12 years ago
link

Comments

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

naavi's avatar naavi (12 years ago)

@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 (12 years ago)

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

naavi's avatar naavi (12 years ago)
2

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

Evgeny's avatar Evgeny (12 years ago)
see more comments