[uWSGI] how to properly set nodes and udp in cache2 config

Roberto De Ioris roberto at unbit.it
Wed Oct 16 11:26:09 CEST 2013


> Hi Roberto,
>
> thanks a lot for your reply. I tried changing my config on slave to:
>
> cache2 = name=test-conf-cache,items=8192,blocksize=2048,udp=127.0.0.1:7172
>
> and on master to:
>
> cache2 =
> name=test-conf-cache,items=8192,blocksize=2048,store=/shared_disk/test_cache2.dump,udp=127.0.0.1:7171,nodes=127.0.0.1:7172
>
> After that, I start slave first, then the master. But this config even
> can not make slave know the initial data stored in the dump file. And
> the slave can not receive cache updates as before.
>
> Then I tried change the slave config to:
> cache2 =
> name=test-conf-cache,items=8192,blocksize=2048,store=/shared_disk/test_cache2.dump,udp=127.0.0.1:7172


do not do this, you can corrupt the cache.

To get initial data from a remote cache (on startup) you need to use the
'sync' parameter.

Supposing the master is started, your slave will be:

name=test-conf-cache,items=8192,blocksize=2048,udp=127.0.0.1:7172,sync=127.0.0.1:7171

btw i do not know why you do not get updates, can you strace the processes ?

-- 
Roberto De Ioris
http://unbit.it


More information about the uWSGI mailing list