RabbitMQ/Erlang 崩溃:无法重新分配 313760 字节的内存(“代码”类型)
Posted
技术标签:
【中文标题】RabbitMQ/Erlang 崩溃:无法重新分配 313760 字节的内存(“代码”类型)【英文标题】:RabbitMQ/Erlang crashing: Cannot reallocate 313760 bytes of memory (of type "code") 【发布时间】:2017-04-29 11:34:08 【问题描述】:谁能帮助理解这些崩溃日志?
RabbitMQ 3.6.6,Erlang 19.1 RabbitMQ 在 Microsoft Windows Web Server 2008 R2 6.1.7601 Service Pack 1 Build 7601 64bit 上运行。
RabbitMQ 在运行正常大约一年后昨天开始崩溃。现在我已将 Erlang 和 RabbitMQ 服务器升级到上述版本,但这并没有改变任何东西 - 仍然崩溃 经常。
.log:
=ERROR REPORT==== 13-Dec-2016::22:13:55 ===
** Generic server rabbit_disk_monitor terminating
** Last message in was update
** When Server state == state,"d:/ETOIMI~1/RabbitMQ/RABBIT~1",50000000,
14439952384,100,10000,#Ref<0.0.1.27257>,false,
true
** Reason for termination ==
** eacces,[erlang,open_port,
[spawn,"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"d:/ETOIMI~1/RabbitMQ/RABBIT~1\"",
[binary,stderr_to_stdout,stream,in,hide]],
[file,"erlang.erl",line,2080],
os,cmd,1,[file,"os.erl",line,230],
rabbit_disk_monitor,get_disk_free,2,
[file,"src/rabbit_disk_monitor.erl",
line,218],
rabbit_disk_monitor,internal_update,1,
[file,"src/rabbit_disk_monitor.erl",
line,193],
rabbit_disk_monitor,handle_info,2,
[file,"src/rabbit_disk_monitor.erl",
line,165],
gen_server,try_dispatch,4,[file,"gen_server.erl",line,601],
gen_server,handle_msg,5,[file,"gen_server.erl",line,667],
proc_lib,init_p_do_apply,3,[file,"proc_lib.erl",line,247]]
-sasl.log:
=CRASH REPORT==== 13-Dec-2016::22:13:55 ===
crasher:
initial call: rabbit_disk_monitor:init/1
pid: <0.211.0>
registered_name: rabbit_disk_monitor
exception exit: eacces,
[erlang,open_port,
[spawn,
"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"d:/ETOIMI~1/RabbitMQ/RABBIT~1\"",
[binary,stderr_to_stdout,stream,in,hide]],
[file,"erlang.erl",line,2080],
os,cmd,1,[file,"os.erl",line,230],
rabbit_disk_monitor,get_disk_free,2,
[file,"src/rabbit_disk_monitor.erl",
line,218],
rabbit_disk_monitor,internal_update,1,
[file,"src/rabbit_disk_monitor.erl",
line,193],
rabbit_disk_monitor,handle_info,2,
[file,"src/rabbit_disk_monitor.erl",
line,165],
gen_server,try_dispatch,4,
[file,"gen_server.erl",line,601],
gen_server,handle_msg,5,
[file,"gen_server.erl",line,667],
proc_lib,init_p_do_apply,3,
[file,"proc_lib.erl",line,247]]
in function gen_server:terminate/7 (gen_server.erl, line 812)
ancestors: [rabbit_disk_monitor_sup,rabbit_sup,<0.164.0>]
messages: []
links: [<0.210.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 6772
stack_size: 27
reductions: 381464
neighbours:
=SUPERVISOR REPORT==== 13-Dec-2016::22:13:55 ===
Supervisor: local,rabbit_disk_monitor_sup
Context: child_terminated
Reason: eacces,
[erlang,open_port,
[spawn,
"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"d:/ETOIMI~1/RabbitMQ/RABBIT~1\"",
[binary,stderr_to_stdout,stream,in,hide]],
[file,"erlang.erl",line,2080],
os,cmd,1,[file,"os.erl",line,230],
rabbit_disk_monitor,get_disk_free,2,
[file,"src/rabbit_disk_monitor.erl",line,218],
rabbit_disk_monitor,internal_update,1,
[file,"src/rabbit_disk_monitor.erl",line,193],
rabbit_disk_monitor,handle_info,2,
[file,"src/rabbit_disk_monitor.erl",line,165],
gen_server,try_dispatch,4,
[file,"gen_server.erl",line,601],
gen_server,handle_msg,5,
[file,"gen_server.erl",line,667],
proc_lib,init_p_do_apply,3,
[file,"proc_lib.erl",line,247]]
Offender: [pid,<0.211.0>,
name,rabbit_disk_monitor,
mfargs,rabbit_disk_monitor,start_link,[50000000],
restart_type,transient,1,
shutdown,30000,
child_type,worker]
我也找到了 Erlang 崩溃转储,请参阅 HERE
如果有更多信息需要我提供,请告诉我。 谢谢!
【问题讨论】:
【参考方案1】:
** eacces,[erlang,open_port,
[spawn,"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"d:/ETOIMI~1/RabbitMQ/RABBIT~1\"",
eacces
是一个Erlang error:
eacces 缺少父目录的搜索或写入权限 目录。
很可能该服务在此处无法访问:d:/ETOIMI~1/RabbitMQ/RABBIT~1\
【讨论】:
好吧,因为在崩溃开始之前权限没有改变,感觉不太可能。但是对于任何情况,我都为每个人添加了完全控制权。 RabbitMQ 继续崩溃。现在我注意到,在同一台机器上运行的其他一些应用程序恰好在 RabbitMQ 崩溃之前占用了所有 RAM。使其他应用程序脱机,到目前为止没有崩溃...此外,当您检查 Erlang 转储时,有一行:Slogan: eheap_alloc: Cannot allocate 2545496 bytes of memory (of type "heap").
以上是关于RabbitMQ/Erlang 崩溃:无法重新分配 313760 字节的内存(“代码”类型)的主要内容,如果未能解决你的问题,请参考以下文章