[erlang-questions] New OTP app available at GitHub: riak_err

Max Lapshin max.lapshin@REDACTED
Fri Nov 12 07:03:33 CET 2010


>
> In would think 5,000,000 msgs on a mailbox would be a sign of a larger
> problem and at that point maybe the VM crashing is a good thing?  Then
> again, I'm not sure.

You are wrong.  VM can survive such failures, but when failed state is
dumping, gen_server tries to send HUGE amount of data (yes, it doesn't
format, but it sends all data to error_logger) to error logger and
then everything fails.  50000000 of messages is a problem in dumping
state:

   format("** Generic server ~p terminating \n"
          "** Last message in was ~p~n"
          "** When Server state == ~p~n"
          "** Reason for termination == ~n** ~p~n",
          [Name, Msg, State, Reason1]),

Here Msg, State and Reason1 can be horribly big, that is why we _must_
limit them right here and I suppose, that best way is to print into
binary inside failing gen_server because there is one error_logger per
all cores and it may become a bottleneck.


More information about the erlang-questions mailing list