Thoughts on when to use 'infinity' timeouts for gen_server:call and friends
Andrew Thompson
andrew@REDACTED
Sun Aug 1 08:43:23 CEST 2010
So, in trying to scale my application, I run into some cases where the
default 5 second timeout imposed on all gen_*:call behaviours isn't
enough and I get cascading timeout failures. I've noticed that most of
the applications in the OTP distribution use 'infinity' as the timeout
for all their :calls().
Basically my question is: does anyone have any good rules of thumb for
when its OK to use a non-standard timeout? Most of my timeouts are
coming from an external source (waiting on another program to do
something). Should I just bulletproof certain core modules and say
"these won't infinite loop, so they can take as long as they need"?
Should I just do like OTP does and just stick 'infinity' in most
everywhere?
Thanks,
Andrew
More information about the erlang-questions
mailing list