[erlang-questions] Handling TICK in a C Node running longish jobs

Robert Raschke rtrlists@REDACTED
Fri Dec 10 10:22:20 CET 2010


On Thu, Dec 9, 2010 at 6:04 PM, Morten Krogh <mk@REDACTED> wrote:

> What aboutnet_kernel:set_net_ticktime(NetTicktime).
>
> But you have to make the change for all nodes in your network, I think.
>
>
> Morten.
>
>
> On 12/9/10 5:01 PM, Robert Raschke wrote:
>
>> Hiya,
>>
>> I've got a C program that acts as a Node using the nice EI interface libs.
>>
>> The C program is single threaded. And it now turns out I sometimes want it
>> to do something that might actually take a few minutes.
>>
>> This in turn leads to TICK messages not getting acknowledged in time and
>> the
>> Erlang Node removing the timed out connection.
>>
>> I'm looking for some thoughts on how best to approach this. A couple of
>> thoughts come to mind:
>>
>> 1. Make the C program multi-threaded.
>> 2. Somehow lengthen the TICK interval for this connection.
>>
>> The first one makes me cringe. And the second one I don't know how to do.
>>
>> Any other ideas or pointers are most welcome,
>> Robby
>>
>>
>
Aha, I think this get's me to a quick workaround (I only have one Erlang and
multiple C Nodes). I can set the kernel net_ticktime config setting. I think
that will allow me to progress in the shot term. I'd never investigated
these setting in any detail; time to learn more.

Obviously, I will still have to figure out how to properly deal with a C
Node that wants to work for an extended period of time. But at least the
pressure is off. :-)

Robby


More information about the erlang-questions mailing list