Disabling memcache

Asked by anshul

How do I completely disable memcache in graphite?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
chrismd (chrismd) said :
#1

If you are using the 0.9 tarball (which has a few bugs), you can create a local_settings.py file in /usr/local/graphite/web/

This file should contain the following line:

MEMCACHE_HOSTS = []

However if you are using the trunk branch, or any other release file, the local_settings.py file should be in /usr/local/graphite/webapp/web/.

Basically it just needs to be in the same directory as settings.py.

Revision history for this message
anshul (anshul-k) said :
#2

This does not work. I get

ValueError: Unable to parse connection string: ""

Seems like a side effect of the bug mentioned in https://answers.launchpad.net/graphite/+question/37746

Any work around?

Revision history for this message
chrismd (chrismd) said :
#3

I put a fix into trunk so that if MEMCACHE_HOSTS is empty then the CACHE_BACKEND gets set as a dummy cache instead of using memcached. This should avoid the problem, however in the 0.9 release the only way of doing this is to manually edit the settings.py file. If you don't mind waiting until I create a new release with all the latest & greatest trunk fixes, it should be ready today or tomorrow. However if you want to get this going right now with the 0.9 release, simply edit the settings.py file like so:

Remove the following line:

CACHE_BACKEND = 'memcached://' + ';'.join(MEMCACHE_HOSTS) + '/?timeout=60'

And replace it with the following:

CACHE_BACKEND = 'dummy:///'

That should avoid any use of memcached.

Revision history for this message
Jeff Blaine (jblaine-kickflop) said :
#4

Solution provided 3+ years ago. Closing.