簡體   English   中英

erlang節點沒有響應

[英]erlang node not responding

我在第一個@ localhost節點的erlang condose中收到了這樣的消息

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

我的問題是 - 在這種情況下什么是超時? 這個事件導致多少時間? 如何防止這種“恐怖”? 我只能通過重啟節點恢復\\恢復到正常工作......但是正確的方法是什么?

謝謝,新年快樂!

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

希望這個對你有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM