How to monitor badly infinite loops in erlang

Is there any simple and effective way to monitor whether an erlang process is in an infinite loop.

I have thought of the following possible feasible solutions:

1. The process memory grows rapidly in a short period of time or continuously for a long time
2. The process Reductions continues to rise for a certain period of time
3. The length of the process message queue only increases and never decreases
4. The process status is always in “running”
5. Locate through erlang:trace, and the function is performing the same processing

These methods are all rather complex and lack quantification, and thus cannot well adapt to different load requirements.

None of those give definite answers (or indeed much of an indication), and a general solution would run afoul of the Halting problem - Wikipedia . Unfortunately there’s little substitute for human investigation. :frowning:

1 Like