F
F
fajiz2017-05-14 03:08:46
SSH
fajiz, 2017-05-14 03:08:46

How to stop node application on VPS?

How to properly stop a node application on a VPS?
sudo killall node - this is probably not quite right, suddenly I have several applications running, but I need one.
How right?
Tried also ps aux | grep node
getting output

root      1141  0.0  6.8 1243160 69656 ?       Ssl  Apr09   0:15 /usr/bin/node /home/ubuntu/again/222/server.prod.js
ubuntu   14216  0.0  0.1  12944  1016 pts/0    S+   00:06   0:00 grep --color=auto node

I execute sudo kill -9 1141but the application does not stop.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2017-05-14
@vshvydky

I think that the process is still nailed, it just starts with a new pid. Apparently, you didn’t pour it into production, that’s why there are such questions.
Options
1. Starting from a process from under the root is a game.
2. Go under the root, check if there is pm2, if the cron is clean, etc., check if there is a service for auto-restart.
3. Figure out what you want to run and through what, I support pm2, a decent utility.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question