ReLaXed spawns defunct chrome processes
Hi, I'm using relaxed in nodeJS with a promise interface by spawning a relaxed child process. I recently crashed my production server with 32k+ defunct chrome processes.
I tried to tree-kill my own child process, browser.close() and tree-kill the process.pid in the program.buildOnce condition, but still it seems 4-5 chrome process are launched.
root 23736 0.5 0.0 0 0 ? Z 19:57 0:00 [chrome] <defunct>
root 23748 0.8 0.0 0 0 ? Z 19:57 0:00 [chrome] <defunct>
root 23752 0.3 0.0 0 0 ? Z 19:57 0:00 [chrome] <defunct>
root 23765 6.0 0.0 0 0 ? Z 19:57 0:00 [chrome] <defunct>Right now the only way I've got to prevent my server from crashing is restarting my docker container every once and a while, which destroys the chrome processes (I'm the one who wrote the dockerfile that is referenced in ReLaXed's README :) )
I have no experience with working directly with puppeteer and would be delighted with a little help!
Thanks!
PS: please don't let me use wkhtmltopdf again!!
Source: RelaxedJS/ReLaXed