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

Lu Liu nudtlliu at gmail.com
Thu Oct 17 06:05:46 CEST 2013

thank you, Roberto. I tried that config, but got the error

[cache-sync] getting cache dump from ...
[cache-sync] unable to connect to the server

then I remove the sync= part on slave, the error is
gone, but the slave can not get data in cache2 from master. With this
config (no sync=...) applied, i monitored the udp traffics on both

I use netstat -uanp | grep uwsgi on master, and get the following results:
udp    0    0*    15242/uwsgi
udp    0    0*    15242/uwsgi

while on slave:
udp    0    0*    9431/uwsgi

I think that means that the udp server on master is successfully
started up, and the slave is listening. Then I run tcpdump on them to
monitor udp traffic:

on slave:
tcpdump -v -i em1 udp 7172

on master:
tcpdump -v -i em1 udp 7171

but no udp packets captured. what's going wrong?



On Wed, Oct 16, 2013 at 5:26 PM, Roberto De Ioris <roberto at unbit.it> wrote:
>> 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=
>> and on master to:
>> cache2 =
>> name=test-conf-cache,items=8192,blocksize=2048,store=/shared_disk/test_cache2.dump,udp=,nodes=
>> 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=
> 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=,sync=
> btw i do not know why you do not get updates, can you strace the processes ?
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

More information about the uWSGI mailing list