我使用“/ usr / bin / memcached -m 128 -p 11211 -U启动了memcached 11211> memcached.log 2>& 1&“。我在ec2 ubuntu 11上运行它。 它只是在没有任何警告的情况下崩溃或登录到控制台或文件。
我从哪里开始调试?
编辑:我用-vvv运行了memcached,并在日志文件的末尾得到了这个。 memcached几乎没有提出大约10个请求并且死了。
> NOT FOUND -1002256595
>30 STORED
30: going from conn_nread to conn_write
30: going from conn_write to conn_new_cmd
30: going from conn_new_cmd to conn_waiting
30: going from conn_waiting to conn_read
30: going from conn_read to conn_parse_cmd
<30 set 160268806ProviderList 1 0 1372
30: going from conn_parse_cmd to conn_nread
> NOT FOUND 160268806ProviderList
>30 STORED
30: going from conn_nread to conn_write
30: going from conn_write to conn_new_cmd
30: going from conn_new_cmd to conn_waiting
30: going from conn_waiting to conn_read
30: going from conn_read to conn_parse_cmd
<30 set -1938194056UserDetails 1 0 356
30: going from conn_parse_cmd to conn_nread
> NOT FOUND -1938194056UserDetails
>30 STORED
30: going from conn_nread to conn_write
30: going from conn_write to conn_new_cmd
30: going from conn_new_cmd to conn_waiting
30: going from conn_waiting to conn_read
30: going from conn_read to conn_parse_cmd
<30 set 160268806UserDetails 1 0 364
30: going from conn_parse_cmd to conn_nread
> NOT FOUND 160268806UserDetails
>30 STORED
30: going from conn_nread to conn_write
30: going from conn_write to conn_new_cmd
30: going from conn_new_cmd to conn_waiting
30: going from conn_waiting to conn_read
答案 0 :(得分:2)
usr / bin / memcached-debug -m 128 -p 11211 -U 11211&gt; memcached.log 2&gt;&amp; 1&amp;
如果你有。如果没有,你可以从源代码构建它。另外,尝试将一个strace附加到进程(假设这种情况一再发生)。
答案 1 :(得分:1)
我忘了使用-d选项将其作为守护程序运行。一旦我添加它,崩溃就消失了。我必须说疯了。 @James谢谢。
/ usr / bin / memcached -m 128 -vvv -p 11211 -U 11211 -u ubuntu -d