[erlang-questions] Get cookie time-out

Antoine Koener antoine.koener@REDACTED
Tue Jun 7 16:25:26 CEST 2011


On Jun 7, 2011, at 16:21 , Ali Sabil wrote:

> Hi,
>
> On Tue, Jun 7, 2011 at 2:51 PM, Olivier BOUDEVILLE
> <olivier.boudeville@REDACTED> wrote:
>>
>> Hello,
>>
>> We are running a distributed application over a cluster and  
>> recently, during
>> its deployment over 45 nodes, we have encountered a time-out  
>> apparently
>> related to the inter-node cookie retrieval:
>> "{timeout,{gen_server,call,[auth,{get_cookie,'SOME_NODE...".
>>
>> We are not that familiar with OTP, but apparently there could be a  
>> way of
>> specifying a time-out for such an internal gen_server: we have  
>> indeed in
>> lib/kernel/src/auth.erl:
>>
>> """
>> start_link() ->
>>     gen_server:start_link({local, auth}, auth, [], []).
>> """
>>
>> I suppose we could add a {timeout,Time} option there ? (there must  
>> be a
>> default time-out, even if I do not know its value)
>
> The default timeout value for gen_server:call() is 5000 ms, maybe you
> could try replacing the gen_server:call/2 with a gen_server:call/3 in
> lib/kernel/src/auth.erl so that:
> """
> get_cookie(Node) ->
>    gen_server:call(auth, {get_cookie, Node}).
> """
>
> becomes:
> """
> get_cookie(Node) ->
>    gen_server:call(auth, {get_cookie, Node}, infinity).
> """

Take care that doing so means that the calling process will be  
blocked...
I'm not sure that this will fix anything.

Instead of infinity, may be increase the timeout, why not 60000 (1  
minute) ?




More information about the erlang-questions mailing list