node-clinic icon indicating copy to clipboard operation
node-clinic copied to clipboard

Heap profile is empty inside docker container

Open dcharp05 opened this issue 3 years ago • 5 comments

Expected Behavior

Commands other than the doctor command work inside docker containers.

Current Behavior

I am running node clinic with a project at work. The doctor command work find and outputs files with data. If I try any other command the output files are empty. Has anyone been able to run this successfully in side docker?

Steps to Reproduce (for bugs)

Running ./node_modules/.bin/clinic ${doctorMode} -- node --max-old-space-size=4096 inside the container, where dockerMode is one of the available commands.

Sample upload

File is empty

Environment

docker-image - > node:14.18.2-alpine latest clinic version

  • Node.js version: Node 14.18.2
  • Browser name and version: Chrome 97

Host OS is Ubuntu x86_64 x86_64 x86_64 GNU/Linux

dcharp05 avatar Feb 25 '22 22:02 dcharp05

Try one of the approaches mentioned in https://github.com/clinicjs/node-clinic/issues/10

RafaelGSS avatar Feb 26 '22 03:02 RafaelGSS

@RafaelGSS yes I saw that thread. The heap profile will start up, but when I kill the process the file is empty and I am not seeing any errors or logs.

dcharp05 avatar Feb 28 '22 17:02 dcharp05

I am seeing the same problem without using a docker container on Ubuntu with Node.js v14. I tried using the timeout --signal=SIGINT 20m approach. I see "Received CTRL+C, closing process..." followed by no errors. Heap profile file is created but still empty.

robross0606 avatar Mar 14 '23 14:03 robross0606

I am more than willing to bet you're hitting https://github.com/clinicjs/node-clinic/issues/444#issuecomment-1474997090

Stono avatar Jun 23 '23 07:06 Stono

It is most likely similar, but I think there is also an extra problem with doing this on Windows due to the unique way it handles signals.

robross0606 avatar Jan 26 '24 20:01 robross0606