pm2 Questions

2

Solved

In pm2 node app manager, what is the difference between stop and delete app. I know that delete app deletes the app, from the pm2:s control, but what does stop app do? They both will set node serve...
Hanschen asked 29/5, 2016 at 13:40

23

Solved

Is there a way for pm2 to run an npm start script or do you just have to run pm2 start app.js So in development npm start Then in production with pm2 you would run something like pm2 start 'npm st...
Tamper asked 23/7, 2015 at 6:18

2

Solved

My Dockerfile contains the pm2 start command as follows: FROM node:10 WORKDIR /usr/src/app COPY . . # ... EXPOSE 8080 CMD [ "pm2", "start", "npm", "--", "start" ] However the container exit...
Essive asked 1/5, 2019 at 12:42

2

I can't get pm2 to start my apps on Windows start. I'm running Windows Server 2012 R2 Standard and pm2 2.4.2. I have a pm2 process file in JSON format which I use to start all my apps. c:\pm2\pro...
Brachyuran asked 21/3, 2017 at 13:52

5

There are several different versions of node running on our linux server, And my service is based on node v0.11.14. However, other people's code have to run on lower version of node(lower than v0.1...
Sacculate asked 20/4, 2015 at 5:9

2

Solved

When my node js server is running via pm2, it has a higher memory usage reading than the actual memory heap in the application when inspected in DevTools. More so, the value under memory in pm2 slo...
Mastrianni asked 25/12, 2019 at 1:38

5

I have seen many questions here but that was not working for me. That why asking this question? I am using DigitalOcean Ubuntu 16.04 server. I have a node project run by "npm start". Script is: ...
Thereabouts asked 30/9, 2018 at 6:21

7

Solved

I am running a node webserver using pm2. Since pm2 spawns another process and redirects stdout and stderr to files, I have to look somewhere else for the logs. Ideally, I would like to have the nod...
Czechoslovak asked 18/3, 2016 at 3:11

3

Solved

I'm using PM2 to run a Python program in the background like so pm2 start helloworld.py and it works perfectly fine. However, within helloworld.py I have several print statements that act as logs...
Mccartney asked 22/6, 2016 at 5:26

5

Solved

I have couple of questions regarding pm2 How can I change the location of server-error-0.log and server-out-0.log files location from c:\users\user\.pm2\logs to other drive, due to restriction in...
Jamison asked 30/8, 2017 at 6:23

3

Solved

I have a website using nodejs. Problem is when user upload images the site stop working. That because of PM2 restart server when file change I think. How to solve this problem. thank you
Cleary asked 28/6, 2016 at 8:24

4

Solved

I am currently developing several Telegram bots but I want to keep all of them in the same git repository. The issue is that on the other hand, I want to run them as separate processes. Since I'm ...
Predictory asked 19/9, 2017 at 18:25

2

I am using websockets/ws on single machine. Its working fine. I want to scale it horizontally on multi-core and on multiple instances. For mutli-core I tried with pm2 and it seems working great. ...
Rattly asked 20/10, 2017 at 11:3

5

I am trying to auto-deploy the project and npm commands run perfectly but when it goes to a line where pm2 restarts the specific projects, then actions fails. GitHub Actions Error: GitHub Actions E...
Bridgeboard asked 20/10, 2021 at 10:37

5

Solved

I need to stop my nodejs app for some conditions.So I have used process.exit() method. I am running my app with PM2. But PM2 is restarting the app whenever it was stopped. So is there any possibili...
Osteoid asked 15/12, 2015 at 16:58

2

Solved

Pm2 default start command runs a script using python2. How can I make it run a script using python3 ? Let us say my script is called app.py .
Acotyledon asked 4/12, 2019 at 10:19

2

I am using PM2 to run my node app as a service. My Node app is RAM Hungry so it consumes around 300 to 800mb of ram depending on traffic. My DigitalOcean droplet has 1GB RAM. Sometimes out of the...
Disaster asked 31/7, 2017 at 9:52

5

Solved

I have a container with nodejs and pm2 as start command and on OpenShift i get this error on startup: Error: EACCES: permission denied, mkdir '/.pm2' I tried same image on a Marathon hoster an...
Grecian asked 21/2, 2017 at 9:14

2

Solved

Previously, I had node version v0.10.46 installed on my ec2 server. For a recent project, I decided to give pm2 a try and installed pm2 using npm install pm2 -g. But, pm2 start index.js errored o...
Eatmon asked 17/1, 2017 at 18:23

1

Although the socket.io document said 'sticky session' can make socket.io work with node cluster. I just can't make it work. I find pm2 had several issues opened against it, the closest solution I ...
Movie asked 23/10, 2017 at 14:26

6

I am trying to start pm2 if it is not running, or kill it and start if it is, how can I achieve this behavior in the WINDOWS command line interface? There are plenty of solutions using grep in lin...
Hemorrhoidectomy asked 12/1, 2016 at 3:13

7

I want to manage my node process with pm2 package. If I don't have any es6 syntax in my code so I don't need to add babel-node, and without any es6 syntax code is am able to run my code with pm2 wi...
Champollion asked 6/2, 2018 at 6:58

4

Solved

does anyone know if it is possible to change in NodeJS PM2 the number of cluster processes for an application at runtime? regards Philipp
Rauscher asked 28/3, 2015 at 16:15

2

Solved

I'm currently using WebStorm as IDE and my project uses pm2 as process manager. The structure of my ecosystem is the following: module.exports = { name: 'myProject', cwd: __dirname, script: 'npm...
Threaten asked 10/3, 2023 at 15:9

9

Solved

Is there a way to add timestamps to error logs in .pm2/logs? I noticed that pm2 logs command shows aggregated logs with timestamps, but looking into log files - there are only messages and stacktr...
Kleinstein asked 23/1, 2014 at 19:43

© 2022 - 2024 — McMap. All rights reserved.