[erlang-questions] Get cookie time-out

Olivier BOUDEVILLE olivier.boudeville@REDACTED
Tue Jun 7 17:21:51 CEST 2011

Thanks Ali and Antoine for your answer! I guess we will indeed use a 
finite, yet increased, time-out for that. 

This is the first time we will have to patch our Erlang version though; 
hopefully, as the scale increases, other exchanges will not require 
hardcoded time-outs to be modified.
As I see it, in some cases, time-outs have indeed to be set to actual 
values (not infinity, for example to overcome hardware faults), but then 
these values are arbitrary and context-dependent.

In our user code we ended up defining profiles (development/production), 
as no single set of values could be used in all contexts. Depending on how 
many constant time-out values are lurking in the Erlang code itself, maybe 
it could be useful to do the same there?

Not strictly related, but still in the proper distributed initialization 
of Erlang nodes, is there any feedback of the Erlang maintaining team 
about the code_server:call/2  suspected race condition ? 

Thanks again,
Best regards,

Olivier Boudeville.
Olivier Boudeville

EDF R&D : 1, avenue du Général de Gaulle, 92140 Clamart, France
Département SINETICS, groupe ASICS (I2A), bureau B-226
Office : +33 1 47 65 59 58 / Mobile : +33 6 16 83 37 22 / Fax : +33 1 47 
65 27 13

07/06/2011 16:25

olivier.boudeville@REDACTED, erlang-questions@REDACTED
Re: [erlang-questions] Get cookie time-out

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 
I'm not sure that this will fix anything.

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

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110607/a2abedc4/attachment.htm>

More information about the erlang-questions mailing list