Answer the question
In order to leave comments, you need to log in
How to kill processes that are older than half an hour in, say, Debian?
I use headless chrome along with Puppeteer in cron, and sometimes it all hangs and processes remain in memory. Is it possible to beat them somehow? To kill all such processes I use
kill $(ps aux | grep 'node_modules' | awk '{print $2}')
Answer the question
In order to leave comments, you need to log in
Get confused with cgroup and nail down the PID list, for example, otherwise you can do business like that.
When starting the process, create a pid file (for example, adding pid to the file name so that they can all be in the same folder). To kill, search by creation time of pid files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question