【问题标题】:Riak eating 100% CPU on OSX installRiak 在 OSX 安装上吃掉 100% 的 CPU
【发布时间】:2013-10-19 04:47:26
【问题描述】:

这个问题与:

Riak node not working, but using 100% cpu

但由于张贴者似乎已经离开,我将我的案例发布在这里。

昨晚我使用 Riak 网站上的配置选项从源代码安装了 erlang(R15B01):

http://docs.basho.com/riak/1.2.1/tutorials/installation/Installing-Erlang/#Installing-on-Mac-OS-X

和 Riak(1.4.1) 在我的 2013 MacBook Pro(2.8GHz i7、16GB 内存、OSX 10.8.3)上。我没有更改 ulimit,因为我认为它可以正常运行。

安装顺利;警告但没有错误,我能够运行玩具示例没有问题。

但是,空实例很快耗尽了所有 4 个内核,我的机器开始发出呜呜声和过热。

查看日志,我看到以下错误重复了千万次:


2013-10-11 09:04:04.266 [error]  CRASH REPORT ¥
 Process  with 0 neighbours exited with reason: ¥
 call to undefined function eleveldb:o

还有大量的崩溃报告:


2013-10-11 09:14:47 =CRASH REPORT====
  crasher:
    initial call: riak_kv_index_hashtree:init/1
    pid: 
    registered_name: []
    exception exit: {{undef,[{eleveldb,open,
["./data/anti_entropy/479555224749202520035584085735030365824602865664",
[{create_if_missing,true},{max_open_files,20},{write_buffer_size,12886952}]],[]},
{hashtree,new_segment_store,2,[{file,"src/hashtree.erl"},{line,499}]},{hashtree,new,2,
[{file,"src/hashtree.erl"},{line,215}]},{riak_kv_index_hashtree,do_new_tree,2,
[{file,"src/riak_kv_index_hashtree.erl"},{line,421}]},{lists,foldl,3,[{file,"lists.erl"},
{line,1197}]},{riak_kv_index_hashtree,init_trees,2,[{file,"src/riak_kv_index_hashtree.erl"},
{line,366}]},{riak_kv_index_hashtree,init,1,[{file,"src/riak_kv_index_hashtree.erl"},
{line,226}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]}]},
[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}
    ancestors: [,riak_core_vnode_sup,riak_core_sup,]
    messages: []
    links: []
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 987
    stack_size: 24
    reductions: 492
  neighbours:

erlang.log 说


=====
===== LOGGING STARTED Fri Oct 11 09:04:01 CEST 2013
=====
Node 'riak@127.0.0.1' not responding to pings.
config is OK
!!!!
!!!! WARNING: ulimit -n is 2560; 4096 is the recommended minimum.
!!!!
Exec: /tmp/riak-1.4.1/rel/riak/bin/../erts-5.9.1/bin/erlexec 
-boot /tmp/riak-1.4.1/rel/riak/bin/../releases/1.4.1/riak
-config /tmp/riak-1.4.1/rel/riak/bin/../etc/app.config
-pa /tmp/riak-1.4.1/rel/riak/bin/../lib/basho-patches
-args_file /tmp/riak-1.4.1/rel/riak/bin/../etc/vm.args -- console
Root: /tmp/riak-1.4.1/rel/riak/bin/..
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:8:8] [async-threads:64]
 [kernel-poll:true]

Eshell V5.9.1  (abort with ^G)
(riak@127.0.0.1)1>

不到 10m 之后,已经有 144MB 的日志文件,其中包含上述变体。

【问题讨论】:

  • 我认为你可能需要重新安装你的 riak,这一次,确保所有依赖项都可用
  • 文档说默认包含 eleveldb,而 riak 页面没有提供有关如何安装它的更多信息。
  • error.log文件中可以发现哪些错误?
  • 我唯一注意到的是关于 leveldb 丢失的东西,在我的帖子的顶部。那来自error.log。详细信息显然在 crash.log 中,这是我上面帖子的第二个引用。我猜由于某种原因没有安装 leveldb?

标签: macos erlang riak


【解决方案1】:

我从源代码构建 riak 1.4.6 时遇到了同样的问题。

我将文件 etc/app.config 中的行改为

{anti_entropy, {off, []}},

Leveldb 被 AAE 使用。请参阅配置参数 anti_entropy_leveldb_opts。

【讨论】:

    【解决方案2】:

    使用过程消除:

    没有更多信息很难说。 200% 是否被使用 beam.smp?您是否在 console.log、error.log 或 crash.log 中看到任何内容 这表明正在发生一些奇怪的事情?有没有客户 当时与集群通信?如果是这样,客户端/协议是什么 他们使用什么类型的操作(例如 get/put/map reduce/etc)?

    参考文献

    【讨论】:

      猜你喜欢
      • 2011-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-21
      • 2013-10-25
      • 2015-01-27
      相关资源
      最近更新 更多