How to read a erl_crash.dump for know the cause of crash that has application?

Hello guys, I hope that all your things are good, I open the file erl_crash but I dont know exactly what is the cause that make that the application crash. I have this files, two files are erl_crash report, the another file is about top in server, the ram has a good average of use, but it never overload until the moment.
The server has this features 4 gb of ram, 500 gb of hd, S.O is Ubuntu with 64 bits.

all advices are well received. best regards .

1 Like

It looks like it’s just running out of memory… How much memory does the program use? How long does it take to crash? Can you open up observer on it and watch it to see if any specific process or binary heap or something keeps growing without shrinking?

EDIT: And for some reason it looks capped to 2gigs of ram?

Oooo, I think I see, you are allocating more ram than what’s available and you have no SWAP memory setup.

Either reduce the memory load of the system (again check your beam program and see what’s eating memory via :observer or so), and/or add swap. You should add swap anyway, I’d say no less than 8 gigs of swap for your system. You can add swap while the system is in use for note, instructions online. :slight_smile:

1 Like

@OvermindDL1 thank you man, I can make some advices that you give me, but other I would not make cause I dont know how to do that, for example: where I can see or watch how much memory does the program use ? and how I can open up observer on it and watch it to see if any specific process or binary heap or something keeps growing without shrinking?

thank you and a lot of thank you for your time.

I usually remove all swap since it introduces huge unpredictablity in performance into the system. Plus I’ve seen some cases when swap causes problems with ssh. It’s safer to fail fast, in my opinion, at least on linux. I heard freebsd is a bit different in regards to swap (it’s possible to mark some processes which won’t go into swap or something like that).

“Swap or no swap for soft real-time elixir apps” might be an interesting discussion to have …

2 Likes

To start observer make sure erlang was compiled with wx in (default builds are unless you built it yourself or didn’t install the package or so), then to start it just make sure you have an X session (locally or over ssh or whatever) and run :observer.start() in the shell, or start a new shell, connect remotely, ping the other node, then run :observer.start() then select the remote node from the top menu. :slight_smile:

Once you get observer up you will see all you can do, it is fantastic. ^.^

1 Like

It is the line marked “Slogan:” which gives the basic cause why the erlang system crashed. In this case you were trying to allocate more memory for process heaps but this was not allowed by the OS.

4 Likes