aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/supervisor.xml
AgeCommit message (Collapse)Author
2011-08-23fix supervisors restarting temporary childrenFred Hebert
In the current implementation of supervisors, temporary children should never be restarted. However, when a temporary child is restarted as part of a one_for_all or rest_for_one strategy where the failing process is not the temporary child, the supervisor still tries to restart it. Because the supervisor doesn't keep some of the MFA information of temporary children, this causes the supervisor to hit its restart limit and crash. This patch fixes the behaviour by inserting a clause in terminate_children/2-3 (private function) that will omit temporary children when building a list of killed processes, to avoid having the supervisor trying to restart them again. Only supervisors in need of restarting children used the list, so the change should be of no impact for the functions that called terminate_children/2-3 only to kill all children. The documentation has been modified to make this behaviour more explicit.
2011-05-12rHans Bolinder
Use Erlang specs and types for documentation
2011-04-12Allow supervisor:terminate_child(SupRef,Pid) for simple_one_for_oneSiri Hansen
supervisor:terminate_child/2 was not allowed if the supervisor used restart strategy simple_one_for_one. This is now changed so that children of this type of supervisors can be terminated by specifying the child's Pid.
2010-09-17Clarify documentation of shutdown timeout in supervisor child specsMagnus Henoch
Make it explicit that the shutdown timeout is to be specified in milliseconds.
2010-02-12Merge branch 'jn/supervisor_child_count_only' into ccase/r13b04_devErlang/OTP
* jn/supervisor_child_count_only: Add count_children/1 to supervisor.erl to determine the number of OTP-8436 Added supervisor:count_children/1 to count the number of children being managed without the memory impact of which_children/1. (Thanks to Jay Nelson.)
2010-02-10Add count_children/1 to supervisor.erl to determine the number ofJay Nelson
children being managed without the memory impact of which_children/1 The function which_children/1 returns a list of the child processes currently being supervised, but it has the penalty of creating a new list thereby consuming more memory. In low memory situations it is often desirable to know which supervisor may have generated many processes, but the act of discovering the culprit should not cause the node to crash (or worse a different node if the kernel kills one randomly). The new function count_children/1 can give an indication of which supervisor is taxing resources the most without adding to the burden. Rather than creating a new list, it walks the supervisor's internal children structure using an accumulator function so that any used memory can be incrementally collected yet the resulting count can still be obtained. The return result of count_children/1 is a property list of counts containing: - {specs, Total_Num_Child_Specs} - {active, Num_Active_Child_Processes_Of_Supervisor_Or_Worker_Type} - {supervisors, Num_Supervisor_Type_Children_Including_Dead_Processes} - {workers, Num_Worker_Type_Children_Including_Dead_Processes} This patch was made in response to mailing list discussions of the problem diagnosing heavily taxed production systems. I cannot find the original request, but http://www.erlang.org/cgi-bin/ezmlm-cgi/4/35060 is my original post of the patch.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP