[erlang-questions] Timeouts: gen_server:call or multi_call, and erlang:monitor
Scott Lystig Fritchie
fritchie@REDACTED
Fri Mar 2 22:46:05 CET 2007
Good afternoon, all. I've found something odd regarding timeout
handling with gen_server:call and gen_server:multi_call. There are
cases where:
gen_server:call({some_server, some@REDACTED}, some_term, 1000)
... can take much longer than 1000 milliseconds before timing out.
It looks like the problem is erlang:monitor/2. If I suspend the
'some@REDACTED' VM with control-Z, I can see this behavior(*):
(t@REDACTED)47> timer:tc(erlang, monitor, [process,{foo_srvr,'s2@REDACTED'}]).
{7005921,#Ref<0.0.0.2791>}
(That's using R11B-3, with whatever default value is for -kernel
net_ticktime (60 seconds?).)
Has anyone had a little/big problem with this kind of timeout? The
control-Z suspension is quite harsh, but it does a not-too-bad job of
simulating an alive-but-very-slow remote node.
-Scott
(*) In a tiny amount of experimenting, erlang:monitor(process, Pid)
when is_pid(Pid) == true shows the same 7 second delay.
More information about the erlang-questions
mailing list