I'm getting a SIGPIPE when trying to read the cache after I kill a memcached server.
I'm using the Perl module Memcached::libmemcached Version 0.2101 (with libmemcached-0.21 embedded). I also installed libmemcached-0.23 before installing the Perl module, but the module is reporting it's using libmemcached 0.21. I have a simple script that starts six memcached servers, sets some items into the cache, then fetches them back. It then kills one of the servers and attempts to read all the keys again. At this point I get a SIGPIPE (according to just a simple strace) and the script dies. write(3, "get a604c5769da20dea8cf84c51abd3"..., 39) = 39 read(3, "", 8196) = 0 write(3, "get 79ee55b4f57b673b01d2e173cf3a"..., 39) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- +++ killed by SIGPIPE +++ Process 7122 detached If I write a similar script using Cache::Memcached I don't see this behavior. (Cache::Memcached doesn't use libmemcached.) I'm a bit new to libmemcached, so before I start digging in is this something anyone else has seen? Or for that matter, can replicate? I'll try and write a C program that tries this on libmemcaced but I can't write C as fast as I used to. Thanks, BTW -- If curious, here's the two scripts I'm using: http://hank.org/libmemd.pl (using Memcached::libmemcached ) http://hank.org/memd.pl (using Cache::Memcached ) Output from first is: starting 6 servers ----------- Items in servers --------- pid:8127 - localhost:12001 = 0 pid:8128 - localhost:12002 = 0 pid:8129 - localhost:12003 = 0 pid:8130 - localhost:12004 = 0 pid:8132 - localhost:12005 = 0 pid:8133 - localhost:12006 = 0 Total: 0 populating 2000 items ----------- Items in servers --------- pid:8127 - localhost:12001 = 318 pid:8128 - localhost:12002 = 346 pid:8129 - localhost:12003 = 338 pid:8130 - localhost:12004 = 340 pid:8132 - localhost:12005 = 339 pid:8133 - localhost:12006 = 319 Total: 2000 Hit: 2000. Miss: 0. Total: 2000 kill one server ----------- Items in servers --------- pid:8127 - localhost:12001 = 318 pid:8128 - localhost:12002 = 346 pid:8129 - localhost:12003 = 338 Port 12004 is removed pid:8132 - localhost:12005 = 339 pid:8133 - localhost:12006 = 319 Total: 1660 Command terminated With the other script It will show something like: Hit: 1660. Miss: 340. Total: 2000 -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt
