pm2 Questions
1
We currently use pm2 to keep our nodejs process alive, we don't use the cluster mode (and the related load balance feature).
Our php team uses supervisord to manage their php process alive, as lara...
Gelignite asked 13/7, 2021 at 5:13
7
Solved
I have a webserver that works when I use node or nodemon (e.g. "nodemon index.js"). However, when I try to use pm2 ("pm2 start index.js"), I get "SyntaxError: Unexpected token import". The full err...
Pericranium asked 21/1, 2020 at 4:3
8
Solved
So I just deployed a site with node and pm2 for the first time and I'm going back and doing some optimization and reading best practices, etc.
I read that you can get a lot of benefit by setting N...
3
Solved
Sorry if this question is to 'newbie' but I can't see how to do it / how it works.
1/ I am creating an API using node.js, API serving some front apps
2/ To get it robust I use pm2 (great product)...
0
I'm running a backend Express app and a React.JS app in one Docker container using PM2. My backend Nodejs Express app works fine, it's just the React app.
I had an initial error of: Cannot use impo...
4
Solved
Problem: We start pm2 in cluster mode, and pm2 starts as many processes as there are cpu cores, pm2 also tries to start as many node servers as there are cpu cores but the problem here is that it f...
Colic asked 6/4, 2018 at 11:31
3
Solved
Tried this, but it doesn't work:
SHELL=/bin/bash
PATH=/usr/lib/node_modules/pm2/bin
* 0,12 * * * pm2 restart all
What am I doing wrong?
5
I just installed CentOS 8 and added nodejs (tried v12 & v14) And then I installed pm2 using npm install pm2@latest (so at the time of posting it uses v4.4.0). I did try an older version (v3.5.0...
4
On ec-2 instance whenever I execute pm2 I get the message...
Spawning PM2 daemon with pm2_home=<home_dir>/.pm2
This occurs with pm2 info, pm2 list, pm2 -h etc.
A bare pm2 will show help.
...
Forty asked 4/5, 2017 at 14:58
3
Solved
My nodejs app has an open-api.yaml file and express-openapi-validate validator. I'm doing a POST request which is working and the api validator doesn't return any errors:
curl --request POST 'http:...
1
I deleted my previous question because it was not very clear, and the problem was not clearly exposed. I have an instance @aws, a repository @gitlab, and gitlab CI is setup.
I made a little app in ...
Incomparable asked 28/9, 2019 at 22:46
3
Solved
i'm running my node.js app on the linux server using PM2, with a config file, like this:
PM2 start mywebsite.config.js
all is good. but now i want to add jenkins to the picture.
i'm running a p...
2
Solved
After creating a Vue project using vue cli, we can run it using
yarn run serve
I am not able to start using pm2. Running
pm2 start yarn -- run serve
I got a few crash-and-restart, after that,...
3
I have an application written in Typescript that runs with PM2. Currently I compile to JavaScript, then use PM2 to start the app. My ecosystem.config.js file looks like this:
module.exports = {
a...
Wive asked 12/6, 2019 at 16:21
3
Solved
I run node app like this:
node -r dotenv/config dist/app
I need something similar using PM2:
pm2 start -r dotenv/config dist/app.js --name appname // doesn't work
I receive the next error: er...
2
I’m setting up a new server and trying now to get pm2 installed and working following this instructions https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-prod...
Paolapaolina asked 9/7, 2019 at 10:6
2
Solved
There is PM2 configuration, /home/foo/someconfig.json
{
"apps": [
{
"name": "foo-main",
"script": "./index.js",
},
{
"name": "foo-bar",
"script": "./bar.js"
},
{
"name": "foo-baz",
"sc...
3
Solved
I have installed pm2 module using the following command:
npm install pm2@latest
Then I tried to start my test application using pm2 as follows:
$ pm2 start test.js
It throws the following error:...
2
Solved
I have a server application that has two deployments, one for the staging environment and another for the production environment. I have two individual scripts that are responsible for starting the...
Cates asked 5/6, 2021 at 15:5
4
I am developing an application that relies completely on Socket.io. As we all know NodeJS by default runs only on one core. Now I would like to scale it across multiple cores. I am finding it diffi...
2
Solved
I used vue-cli in
vue init nuxt/express myProject
and,
npm run dev
developed.
but,
npm run build
after, was created dist file.
How i can run in real service in pm2?
(I will use u...
Bromberg asked 28/5, 2017 at 8:32
2
Solved
I'm happy with how PM2 formats and outputs the log with
pm2 logs app
But currently it truncates the log to 20 last entries:
[PM2] Tailing last 20 lines for [app] process
...
Is there a way...
5
Solved
I want to restart my Node.Js app using PM2 through
pm2 restart app.js
using crontab but ONLY if the app is not already running (e.g. if my server crashed and restarted and pm2 didn't restart).
...
1
I'm having troubles with pm2.
I'm using a module called pm2-logrotate but the logs have a huge gize like 1.7G and don't respect my configuration which is
== pm2-logrotate ==
┌────────────────┬───...
Suttles asked 2/1, 2018 at 9:28
3
Iam trying to start a next.js app with 2 clusters in pm2. So mapped the command yarn start to pm2 start yarn -i 2 --name "frontend" -- start
App starts and then crashes within a second.
[PM2] St...
Vick asked 9/3, 2020 at 11:42
© 2022 - 2024 — McMap. All rights reserved.