Closed sihunqu123 closed 4 years ago
can you include a server to reproduce?
@mcollina sorry, what do u mean by include a server
?
tried the production-server.md
0x --collect-only my-app.js
0x --visualize-only 7777.0x
still no flamegraph.html
generated after 0x --visualize-only 7777.0x
in the <pid>.0x
directory.
BTW, I noticed that this is a Killed
at the end of the terminal:
bb/bbb.yml"],"newPosition":"/bbb/abc/"}}}}}]
🔥 Process exited, generating flamegraphKilled
[ATLAS][root@atlas-worker-0 worker-microservice]#
PS: I have only press the Ctrl+C
one time.
It's impossible to fix this if you do not provide a way to reproduce the problem.
Yes, we are trying to upload the server code. BTW, the deubg info:
🔥 Process exited, generating flamegraph 0x moving isolate file into folder +0ms
TypeError [ERR_INVALID_ARG_TYPE]:
🚫 The "path" argument must be of type string. Received type undefined
at validateString (internal/validators.js:125:11)
at join (path.js:1147:7)
at v8.catch (/usr/local/site/nodejs/lib/node_modules/0x/index.js:83:27)
at process._tickCallback (internal/process/next_tick.js:68:7)
0x TypeError [ERR_INVALID_ARG_TYPE]:
0x 🚫 The "path" argument must be of type string. Received type undefined
0x at validateString (internal/validators.js:125:11)
0x at join (path.js:1147:7)
0x at v8.catch (/usr/local/site/nodejs/lib/node_modules/0x/index.js:83:27)
0x at process._tickCallback (internal/process/next_tick.js:68:7) +0ms
[ATLAS][root@atlas-worker-0 worker-microservice]#
@mcollina Resolved, thanks.
0x
is also a nodejs process) process got killed isOOMKilled
. When there is no enough memory, while 0x
requires a large amount of memory, the process will be killed. As a result, not only the html file is not generated, the generated json file is also not valid(the bracket
doesn't match).
In addition, as mentioned there Memory Issues / productionServers, we can add --stack-size=8024
to reduce the possibility of OOMKilled. But it still can NOT avoid OOMKilled, especially when the OS RAM is very small. e.g. 500M, which very common in the container env, like docker/k8s.
use 0x to start my nodejs server
0x src/index
send sig-int
press
Ctrl + C
to generating flamegraph.list files generated after a while
ls -A <pid>.0x/
results:And there is no
flamegraph.html
generated.OS:
nodejs: v10.19.0