superfly / flyctl

Command line tools for fly.io services
https://fly.io
Apache License 2.0
1.36k stars 224 forks source link

Export env vars logging Erlang crash dumps #3649

Closed matthewlehner closed 3 weeks ago

matthewlehner commented 3 weeks ago

Change Summary

What and Why:

This will output Erlang crash dumps to stderr, rather than to an erl_crash.dump file.

Many folks run into issues trying to debug an Elixir application that is crashing and the logs output this:

Crash dump is being written to: erl_crash.dump...done

Because our machines are ephemeral, this is cleared immediately and there's no way get the file without doing shenanigans with your Dockerfile. Now you have minimal shenanigans to get the info via fly logs.

How:

Environment variable exports

Related to:

https://community.fly.io/t/how-to-read-erl-crash-dump/20404?u=morzaram


Documentation