[rabbitmq-discuss] Memory leak caused by error_logger in 2.8.6?

Travis hcoyote at ghostar.org
Tue Oct 23 19:02:54 BST 2012


On Tue, Oct 23, 2012 at 12:10 PM, Simon MacMullen <simon at rabbitmq.com> wrote:
>
> Ah right, I saw an Erlang term in your mail and assumed you were an Erlang
> developer :-) Try:
>
> rabbitmqctl eval 'erlang:garbage_collect(whereis(error_logger)).'
>

Looks like we have a winner.

$ sudo  rabbitmqctl eval
'lists:sublist(lists:reverse(lists:sort([{process_info(Pid, memory),
Pid, process_info(Pid)} || Pid <- processes()])), 30).' | head -3
[{{memory,1655528576},
  <4865.6.0>,
  [{registered_name,error_logger},
$ sudo rabbitmqctl eval 'erlang:garbage_collect(whereis(error_logger)).'
true
...done.
$ sudo  rabbitmqctl eval
'lists:sublist(lists:reverse(lists:sort([{process_info(Pid, memory),
Pid, process_info(Pid)} || Pid <- processes()])), 30).' | head -3
[{{memory,47744392},
  <4865.244.0>,
  [{current_function,{gen_server2,process_next_msg,1}},

and I confirmed in the management interface that we dropped all the
memory that was in use by the error_logger.

>
> That makes sense - during the outage the error logger does a lot of work but
> doesn't get quite as far as GCing, then after the outage is over it does so
> much less work that it never goes through enough reductions to GC.
>

Travis

-- 
Travis Campbell
travis at ghostar.org


More information about the rabbitmq-discuss mailing list