thank you, Roberto. I tried that config, but got the error [cache-sync] getting cache dump from 127.0.0.1:7171 ... [cache-sync] unable to connect to the server
then I remove the sync=127.0.0.1:7171 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 nodes. I use netstat -uanp | grep uwsgi on master, and get the following results: udp 0 0 0.0.0.0:39792 0.0.0.0:* 15242/uwsgi udp 0 0 127.0.0.1:7171 0.0.0.0:* 15242/uwsgi while on slave: udp 0 0 127.0.0.1:7172 0.0.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? thanks, lliu On Wed, Oct 16, 2013 at 5:26 PM, Roberto De Ioris <[email protected]> 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=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 > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
