a further question is, is there anyway to restrict the mailbox size?<br><br>On Sunday, February 1, 2009 3:11:14 AM UTC+8, Geoff Cant wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Cliff Moon <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="J9RpPcZpv3YJ">cl...@moonpolysoft.com</a>> writes:<p>> is there any way to inspect mailbox size at runtime?  Under load testing <br>> I'm seeing conditions pop up where a node will go out of control due to <br>> mailbox growth and it's rather hard to debug the issue post mortem from <br>> crash dumps.</p><p>erlang:process_info/2 is very helpful for this:<br>erlang:process_info(Pid, messages_queue_len) gives you the length of the<br>queue and erlang:process_info(Pid, messages) gives you the queue itself.</p><p>A common cause of mailbox blowout is that the process is blocked waiting<br>for a reply from something - in this case erlang:process_info(Pid,<br>backtrace) and erlang:process_info(Pid, current_function) can help you<br>figure out what it might be waiting for.</p><p>Cheers,<br>-- <br>Geoff Cant</p><p><br></p><p></p><p></p><p></p><p></p></blockquote>