My Elixir application uses about 50% of the processor, but it really should use only <1%. I'm trying to figure out what causes high CPU usage and I'm having problems.
In the remote console, I tried
- List all processes with
Process.list - Looking at process information with
Process.info - Sort processes by number of cuts
- Sort processes by message queue length
Message queues are all close to 0, but the number of abbreviations is very large for some processes. Processes with many abbreviations are called
- : file_server_2
- ReactPhoenix.ReactIo.Pool
- : code_server
(1) and (3) are present in my other applications, so I feel it should be (2). I'm stuck here. How can I go further and find out why (2) uses so much CPU?
I know that ReactPhoenix uses react-stdio . Considering top, response-sdtio does not use any resources, but the beam does.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 87 53.2 1.2 2822012 99212 ? Sl Nov20 580:03 /app/erts-9.1/bin/beam.smp -Bd
root 13873 0.0 0.0 4460 792 ? Rs 13:54 0:00 /bin/sh -c deps/react_phoenix/node_modules/.bin/react-stdio
I have seen in https://stackoverflow.com/a/168449/ ... that stdin can cause resource problems, but I'm not sure if this applies here. In any case, any help would be greatly appreciated!
source
share