erlang节点没有响应

标签 erlang mnesia

我在 first@localhost 节点的 erlang condose 中收到了这样的消息

=ERROR REPORT==== 1-Jan-2011::23:19:28 ===
** Node 'second@localhost' not responding **
** Removing (timedout) connection **

我的问题是 - 在这种情况下什么是超时?多久之前导致此事件?
如何防范这种“恐怖”?我只能通过重新启动节点来恢复\恢复正常工作......
但正确的方法是什么?

谢谢你,新年快乐!

最佳答案

对 Erlang 源码中的不响应字符串进行 Grepping,可以在 dist_util 中查看消息是如何生成的kernel 中的模块应用程序(con_loop 函数)。

    {error, not_responding} ->
        error_msg("** Node ~p not responding **~n"
              "** Removing (timedout) connection **~n",
              [Node]),

在该模块中,存在以下文档,解释滴答声和不响应节点背后的逻辑:
%%
%% Send a TICK to the other side.
%%
%% This will happen every 15 seconds (by default) 
%% The idea here is that every 15 secs, we write a little 
%% something on the connection if we haven't written anything for 
%% the last 15 secs.
%% This will ensure that nodes that are not responding due to 
%% hardware errors (Or being suspended by means of ^Z) will 
%% be considered to be down. If we do not want to have this  
%% we must start the net_kernel (in erlang) without its 
%% ticker process, In that case this code will never run 

%% And then every 60 seconds we also check the connection and 
%% close it if we havn't received anything on it for the 
%% last 60 secs. If ticked == tick we havn't received anything 
%% on the connection the last 60 secs. 

%% The detection time interval is thus, by default, 45s < DT < 75s 

%% A HIDDEN node is always (if not a pending write) ticked if 
%% we haven't read anything as a hidden node only ticks when it receives 
%% a TICK !! 

希望这个对你有帮助。

关于erlang节点没有响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4579129/

相关文章:

windows - ejabberd模块编译错误

Erlang unique_integer 重启后返回相同的整数

erlang - 使用前缀从 mnesia 中匹配/选择

ruby - 使用 ruby​​ 进行套接字编程是个好主意吗?

Java erlang套接字通信

performance - 下载文件时 CPU 使用率高

process - 为什么Erlang进程创建和消息传递时间比java和C#少

erlang - 更新 mnesia 模式最简单的方法是什么?

erlang - ejabberd:检查 Mnesia 表?

docker - 系统重启后 Mnesia 无法识别数据(no_exists 错误)