1

我使用“/usr/bin/memcached -m 128 -p 11211 -U 11211 > memcached.log 2>&1 &”启动了 memcached。我在 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
4

2 回答 2

2

usr/bin/ memcached-debug -m 128 -p 11211 -U 11211 > memcached.log 2>&1 &

如果你有它。如果没有,您可以从源代码构建它。此外,尝试将 strace 附加到该过程(假设这种情况反复发生)。

于 2012-10-18T19:08:56.213 回答
1

我忘了使用 -d 选项将它作为守护进程运行。一旦我添加它,崩溃就消失了。我必须说疯了。@詹姆斯谢谢。

/usr/bin/memcached -m 128 -vvv -p 11211 -U 11211 -u ubuntu -d

于 2012-10-21T03:30:35.503 回答