error_logger and user memory usage

Matthias Lang <>
Fri May 5 13:32:27 CEST 2006


Samuel Rivas writes:

 >   The problem is that after a certain number (less than 4) of consecutive 
 > failures my system runs out of memory and starts swapping. The processes
 > that seem to be eating the memory are error_logger and user; even after
 > stopping the system they use more than 100 M.

Do things improve if you explicitly GC those processes, i.e. call

  erlang:garbage_collect(Pid)

 >   I reckon the problem are the verbose error reports that are written in
 > the tty (large messages and large states in the crashing gen_servers).
 > 
 >   An easy workaround is removing error_logger_tty_h from the error_logger
 > and living with sasl error_handler only.

I'm not sure if this is directly related to your problem, but I had
problems with gigantic error reports swamping my logging system with
relatively useless information. I solved it by writing my own code
to format error reports. The trick is that it limits the length of printouts.

  http://www.corelatus.se/~matthias/trunc_io.erl

Mattthias



More information about the erlang-questions mailing list