Search code examples
erlangheartbeaterl

usage of erlang heart


How should heart be used to keep an application alive?

Lets say I have an application X, will it be monitored if I just call something like:

erl -boot X -heart -env HEART_BEAT_TIMEOUT 30 -detached

?


Solution

  • Yes, this will automatically start a heart process that monitors your node. See the heart documentation.

    Update: Yes, Asymptote is correct. You also need a HEART_COMMAND environment variable to instruct heart of what to do when restarting the node.