4

私はfirst@localhostノードのerlangcondoseでそのようなメッセージを受け取りました

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

私の質問は-この場合のタイムアウトとは何ですか?このイベントが発生するまでにどのくらいの時間がかかりますか?この「恐怖」を防ぐ方法は?ノードを再起動するだけで通常の作業に復元/回復できます...しかし、正しい方法は何ですか?

ありがとう、そして明けましておめでとうございます!

4

1 に答える 1

9

Erlangソースコードの応答しない文字列を検索すると、アプリケーション(関数)のdist_utilモジュールでメッセージがどのように生成されるかを確認できます。kernelcon_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 !! 

これが少し役立つことを願っています。

于 2011-01-06T10:10:53.720 に答える