I use Spymemcached to access memcached on the server. I started memcached using the following command
memcached -m 4096 -p 11211 -u memcache -l 127.0.0.1 -d -vvv
and I use the following driver to put some key / value pairs in Memcache. For some reason, after the last get
operation, the main
function just hangs; it never ends.
import java.net.InetSocketAddress; import net.spy.memcached.MemcachedClient; public class memcache { public static void main(String args[]) {
I get the following output, but the application never ends.
2011-12-04 14:18:31.839 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue Connected to Memcached. 2011-12-04 14:18:31.844 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@578088c0 ***1 Done.
The server reports the following status:
<32 server listening (udp) <33 new auto-negotiating client connection 33: going from conn_new_cmd to conn_waiting 33: going from conn_waiting to conn_read 33: going from conn_read to conn_parse_cmd 33: Client using the ascii protocol <33 set HELLO 512 3600 1 33: going from conn_parse_cmd to conn_nread > NOT FOUND HELLO >33 STORED 33: going from conn_nread to conn_write 33: going from conn_write to conn_new_cmd 33: going from conn_new_cmd to conn_waiting 33: going from conn_waiting to conn_read 33: going from conn_read to conn_parse_cmd <33 get HELLO > FOUND KEY HELLO >33 sending key HELLO >33 END 33: going from conn_parse_cmd to conn_mwrite 33: going from conn_mwrite to conn_new_cmd 33: going from conn_new_cmd to conn_waiting 33: going from conn_waiting to conn_read
What problem could cause main
never end? Anyone have any suggestions?
source share