erlang节点没有响应

发布于 2024-10-09 16:49:14 字数 310 浏览 10 评论 0原文

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

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

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

谢谢您,新年快乐!

I received such message in erlang condose at first@localhost node

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

My question is - what is timeout in this case? How much time before causes this event?
Howto prevent this "horror"? I can restore\recover to normal work only by restart node...
But what is the right way?

Thank you, and Happy New Year!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

み格子的夏天 2024-10-16 16:49:14

在 Erlang 源代码中查找 没有响应 字符串,您可以看到该消息是如何在 kernel 应用程序的 dist_util 模块中生成的( 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 !! 

希望这会有所帮助。

Grepping for the not responding string in the Erlang source code, you can see how the message is generated in the dist_util module in the kernel application (con_loop function).

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

Within the module, the following documentation is present, explaining the logic behind ticks and not responding nodes:

%%
%% 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 !! 

Hope this helps a bit.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文