Skip to content

Clean boot in erlang relx release

Srijan Choudhary
1 min read

We use relx to release out erlang applications, and faced a problem:

Our application was crashing at bootup, and therefore we were not able to even open a remote shell on which we can run any correction functions.

One way to solve this (which we've been using till now) is to also install erlang on the machine which has the release, and open an erlang shell with the correct library path set.

But, the release generated by relx provides another mechanism which does not need erlang installed.

The solution is: erlang boot scripts.

Detailed information about boot scripts can be found at: http://erlang.org/doc/system_principles/system_principles.html#id59026

relx ships a start_clean.boot boot script with the release, which loads the code for and starts the applications kernel and stdlib.

Sample command:

${RELEASE_DIR}/myapplication/bin/myapplication console_boot start_clean
erlang development

Related Posts

Slackbot using google cloud serverless functions

Slack bot using Google Cloud Functions to post a roundup of recently created channels

Slackbot using google cloud serverless functions

Erlang: Dialyzer HTML Reports using rebar3

How I made a custom rebar3 plugin to generate HTML reports for dialyzer warnings

Running multiple emacs daemons

Run multiple emacs daemons for different purposes and set different themes/config based on daemon name