[rabbitmq-discuss] Erlang has closed
Matthias Radestock
matthias at lshift.net
Fri Sep 18 06:11:21 BST 2009
Tsuraan,
tsuraan wrote:
> I think what's happening is that the os_mon:call (from cpu_sup:avg1())
> is errorring out somehow, so its return value is { error, _ } instead
> of a number. In the local_load function of rabbit_load.erl, where you
> currently have
>
> _Other -> cpu_sup:avg1()
>
> it should probably be
>
> _Other ->
> case cpu_sup:avg1() of
> { error, _ } -> 0.0;
> Value -> Value
> end
Well spotted. It should be 'infinity' instead of 0.0 though, and we
shouldn't ignore the error if it is something other than timeout.
I have committed a fix which, subject to qa, will make it into the next
release.
(Btw, the reason for the timeout is that even though the cpu_sup
gen_server:call has a timeout of infinity, internally there is a
measurement_server_call with a timeout of 5s, which presumably gets
triggered under heavy load).
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list