lishunli / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
0 stars 0 forks source link

https://www.google.com/accounts/RP?c=COzthuP5lOSk1AEQ_aGhj8PDtIjdAQ&hl=zh #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.启动memcached:memcached -p 11211 -u root -f 1.001 -m 64 -n 128 -vv

2.用xmemcached存取数据

public static void main(String[] args) throws Exception{
        // TODO Auto-generated method stub
        MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil
                .getAddresses("10.189.8.116:11211"));
        //builder.setSessionLocator(new ElectionMemcachedSessionLocator());
        MemcachedClient mc = builder.build();
        int tm = (int)(Math.random()*100);
        mc.add("key" + tm, 0, "中国包装总公司" + tm);

        String val = mc.get("key" + tm);

        System.out.println(val);

        mc.shutdown();

    }
3.

What is the expected output? What do you see instead?

 异常为:

Exception in thread "main" java.util.concurrent.TimeoutException: Timed 
out(1000) waiting for operation
    at net.rubyeye.xmemcached.XMemcachedClient.latchWait(XMemcachedClient.java:2200)
    at net.rubyeye.xmemcached.XMemcachedClient.fetch0(XMemcachedClient.java:491)
    at net.rubyeye.xmemcached.XMemcachedClient.get0(XMemcachedClient.java:847)
    at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:805)
    at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:816)
    at net.rubyeye.xmemcached.XMemcachedClient.get(XMemcachedClient.java:838)
    at XMTest.main(XMTest.java:21)

 memcached后台提示:

<40 new auto-negotiating client connection
40: Client using the ascii protocol
<40 add key50 0 0 107
>40 STORED
<40 get key50
Segmentation fault
[root@p2ash004 ~]# 

 memcached居然直接挂了!!!!!!!!!!!!

如果memcached启动命令的修改为:

memcached -p 11211 -u root -f 1.01 -m 64 -n 128 -vv

仅仅是 -f 1.001 修改为 -f 1.01,程序就正常了!

What version of the product are you using? On what operating system?
memcached版本为:1.4.5 on  GNU/Linux 2.4.0

xmemcached版本为:1.2.5

Please provide any additional information below.

Original issue reported on code.google.com by javant...@gmail.com on 31 Aug 2010 at 7:27

GoogleCodeExporter commented 9 years ago
memcached增长因子导致的问题,标题错了,不知道怎么修改阿

Original comment by javant...@gmail.com on 31 Aug 2010 at 7:29

GoogleCodeExporter commented 9 years ago
这个问题你要去memcached的issue列表提交,跟xmc本身没有关系。

http://code.google.com/p/memcached/issues/list

Original comment by killme2...@gmail.com on 31 Aug 2010 at 7:34

GoogleCodeExporter commented 9 years ago
我知道了
要用 二进制协议 存取中文数据

管理员closed这个问题吧。

Original comment by javant...@gmail.com on 31 Aug 2010 at 8:50

GoogleCodeExporter commented 9 years ago

Original comment by killme2...@gmail.com on 31 Aug 2010 at 8:51

GoogleCodeExporter commented 9 years ago
ok,clearly revel us

Original comment by liangzij...@gmail.com on 11 Aug 2011 at 1:16