Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export env vars logging Erlang crash dumps #3649

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

matthewlehner
Copy link
Contributor

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

  • Fresh Produce
  • In superfly/docs, or asked for help from docs team
  • n/a

Uncommenting these exports 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`.
@matthewlehner matthewlehner merged commit dd3c03f into master Jun 18, 2024
34 checks passed
@matthewlehner matthewlehner deleted the mpl/log-erl_crash_dump branch June 18, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants