From ea961f20ee1bc07ab5f1552df86b7167041c58c4 Mon Sep 17 00:00:00 2001 From: zachdaniel Date: Thu, 20 Dec 2018 14:38:31 -0500 Subject: [PATCH] feat: restart on heartbeat timeout --- README.md | 11 +++++++++++ rel/vm.args | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 88bf0c3532..768353f010 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,17 @@ _Additional runtime options:_ * Run Phoenix Server with real time indexer `iex -S mix phx.server` +### Automating Restarts + +By default `blockscout` does not restart if it crashes. To enable automated +restarts, set the environment variable `HEART_COMMAND` to whatever you run to +start `blockscout`. You can configure the heart beat timeout, which will change +how long it will wait before considering the application to be unresponsive. At +that point, it will kill the current blockscout and execute `HEART_COMMAND`. +By default a crash dump is not written unless you set `ERL_CRASH_DUMP_SECONDS` +to a positive or negative integer. See the documentation for +[heart](http://erlang.org/doc/man/heart.html) for more information. + ### BlockScout Visual Interface ![BlockScout Example](explorer_example.gif) diff --git a/rel/vm.args b/rel/vm.args index 93f34bb37a..4989da99a2 100644 --- a/rel/vm.args +++ b/rel/vm.args @@ -10,7 +10,7 @@ ## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive ## (Disabled by default..use with caution!) -##-heart +-heart ## Enable kernel poll and a few async threads ##+K true