Questions tagged [pm2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
507 views

pm2 process kill the server by running pm2 update multiple times

We stumbled upon a very strange problem while running any pm2 command. While running pm2 list we got this result inside console [PM2] Spawning PM2 daemon with pm2_home=/root/.pm2 [PM2] PM2 ...
Milos's user avatar
  • 101
0 votes
0 answers
475 views

pm2 in systemd not actually starting processes

I'm having an issue where I'm running pm2 as pm2-root under systemd (this is on Amazon Linux2023). The daemon runs fine, and if a process dies, it restarts it fine. However, if the server reboots, pm2-...
philolegein's user avatar
0 votes
1 answer
301 views

Apache Cannot See PM2 Node Process

I have Apache running on Ubuntu 20 and I keep getting this error in /var/logs/apache2/error.log: [proxy:error] [pid 7064] (111)Connection refused: AH00957: http: attempt to connect to 127.0.0.1:4000 (...
Clifton Labrum's user avatar
0 votes
0 answers
126 views

migrate pm2 services to new server

In order to support the most recent versions of NodeJS, we need to migrate our web servers from Amazon Linux 2 to Amazon Linux 2023. Making this move precludes us from doing the usual spin-up/down ...
philolegein's user avatar
0 votes
0 answers
300 views

PM2 Cluster Mode - All Clusters restarting on error

I am running a NodeJS application in Cluster mode: pm2 start server.js -i max Assume I have 2 clusters (0 and 1)... Our application is a simple NodeJS backend app running Express. However, there is ...
Collin Stiner's user avatar
0 votes
1 answer
548 views

PM2 cluster mode additional processes use wrong script path

I have a nodejs app running on a server with the following ecosystem.config.js: module.exports = { apps : [ { name : "app.website.com", script : "/...
jdog's user avatar
  • 131
0 votes
1 answer
421 views

How can I find out where a port number for a React website is saved?

I have a Debian machine, I can see that a React website is running on port 4173 but can't find out where it is so that I can change the port. I assume it is in some config file somewhere. it's not in ...
Edward Tanguay's user avatar
2 votes
0 answers
785 views

Shall I do load balancing in nginx, pm2 or both?

PM2 allows to run NodeJS apps on multiple instances, i.e., different cores, allowing load balancing using the same port. PORT=3000 pm2 start -i NUMBER_OF_CORES(e.g 2) app.js But I could also do load ...
João Pimentel Ferreira's user avatar
0 votes
0 answers
703 views

When calling script from jenkins it is not working as expected

we have one react application and start it using pm2 with pm2 start manually. We have written one script to run it, it is working as expected when we run script manually on server. But when calling ...
Satish Lamak's user avatar
0 votes
0 answers
6k views

NodeJs app working when started using npm start, but not with PM2

Very new to server stuff, sorry if this may be a noob question. Problem I am trying to run React and Node/express on a server. React does work and when I start my node app via npm start the server ...
Tommy's user avatar
  • 101
0 votes
1 answer
1k views

Litespeed - NextJS app in DigitalOcean Droplet - Restart Custom Server

Am using the DigitalOcean OpenLiteSpeed NodeJS image from marketplace for setting up the Droplet, for running my NextJS app. I have setup everything and when tested, the home page was displaying ...
Vpp Man's user avatar
  • 103
0 votes
1 answer
1k views

pm2 Multiple God Daemons and node process Spawning

I Have node apps unning using pm2.And it is spawning multiple pm2 daemon instead of one which is eating up all the memory. When I run ps aux | grep pm2 Command I see multiple God daemons for the pm2 ...
Sterina Pen's user avatar
0 votes
1 answer
101 views

Rebooted Ubuntu server, nginx site no longer accessible from browser

I rebooted my Ubuntu server this morning because I was having what appeared to be a low-memory error (happens occasionally, hasn't been enough of a problem to try and fix it). But now, my site (which ...
Tinstar's user avatar
  • 101
0 votes
2 answers
13k views

PM2 - Process or Namespace not found when deploying with GitLab CI

When deploying from CI, as the user who started PM2, pm2 restart appname always results in [PM2][ERROR] Process or Namespace appname not found whoami/who on deployment shows the correct user. Tried ...
Klav's user avatar
  • 101
2 votes
1 answer
1k views

My Node.JS program running on an internet-facing server is printing impossible text to the stdout log. Have I been compromised?

(EDIT: Turns out the "strange behavior" is explained by a simple oversight. Keeping this question here in case anyone else overlooks it) I hope I am asking this question right. I have a ...
majneeds2chill's user avatar
1 vote
2 answers
4k views

cron is not restarting pm2 [duplicate]

I've tried many things but cron just won't restart pm2. I set the crontab -e with: SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin */10 * * * * /usr/bin/node /usr/bin/pm2 restart all And the I ...
pete's user avatar
  • 41
0 votes
1 answer
2k views

Deploying nodejs app using npx http-server and Nginx

I am deploying a nodejs app I have tried two alternatives but I can't understand what's the better approach in terms of performance. The first approach I tried is to lunch using pm2 npm start (which ...
G M's user avatar
  • 105
0 votes
2 answers
1k views

Program installed for one user cannot be accessed from other user even full path is provided

I have all the npm pacakages installed for a particular user (i.e) not root (/home/otheruser/*) I am using monit to see whether to check the program is running. In this case its pm2, which is in /home/...
The Keeper's user avatar
0 votes
2 answers
6k views

Digital Ocean Droplet spikes to 100% CPU usage without any traffic

I recently setup a new Droplet (most basic one) and running react app with very light express server with pm2 (server has been running 16h with 0% cpu usage and 90mb ram). I started the server, no ...
StuckBetweenTrees's user avatar
0 votes
1 answer
139 views

pm2 deployment to aws micro instance of ubuntu 12.0

I have ran a pm2 deploy script that seems to have hung, I am running a aws EC2 Micro instance runnning ubuntu 12. The only indication I have of what's wrong that I can tell is a message I got when ...
Anders Kitson's user avatar
0 votes
0 answers
467 views

EC2 Instance with node pm2 keeps breaking my instances ssh

Update:ok weird so my instance public dns seemed to change? is that possible, now I can ssh in after changing to the new one. still can't ssh in from the browserbased connection tho. I have a ec2 t2....
Anders Kitson's user avatar
1 vote
0 answers
688 views

EC2 - ERR_CONNECTION_TIMED_OUT

I have a ec2 free tier instance running linux, apache web server and nodejs app. I have configured security group and it worked ok so far. But now i can not access server through DOMAIN or IP with ...
Tristan's user avatar
  • 21
1 vote
1 answer
3k views

NodeJS and Redis Cluster - Error: connect EMFILE

I'm banging my head against the wall now for 3 days and counting. I hope you can tell me what am I doing wrong. I have a Redis cluster with 3 masters and 3 slaves. A NodeJS application wishes to use ...
Bert's user avatar
  • 1,066
1 vote
1 answer
11k views

How to point cname to nginx server that uses reverse-proxy [closed]

I've got a server using wildcard subdomains. I'm using nuxtjs, nginx that runs on a reverse proxy on port 3000. Every user should be able to create a subdomain on the site, for example subdomain....
Matilde's user avatar
  • 11
0 votes
1 answer
2k views

Forward Real IP from Nginx Proxy to PM2 Web Server

I have an API powered by a mean stack and served using PM2. It exposes a HTTP endpoint at http://89.89.89.89:8080 (example IP) - I can access this directly using my browser. I have installed Nginx ...
Ralph's user avatar
  • 892
1 vote
1 answer
154 views

Calculate pm2 ram consumption on basis of hit or traffic

I have deployed loopback backend application in ec2 instance. I am using Pm2 server. How can I calculate ram and cpu for traffic or hit ?
MD. Ashfaqur Rahman Tahashin's user avatar
0 votes
1 answer
777 views

nginx + pm2 locations error

quite new to nginx and struggle to make the simplest thing running on digitalocean ubuntu 16.04 server. I have a node.js app running behind pm2 and this works fine with requests to mydomain.com:5002/...
Дмитро Булах's user avatar
1 vote
1 answer
1k views

pm2-logrotate rotates standard error but not standard output

pm2-logrotate rotates standard error but not standard output. This is the content of ~/.pm2/module_conf.json { "pm2-logrotate": { "max_size": "10M", "retain": "30", "...
Gibezynu's user avatar
0 votes
0 answers
4k views

Pm2 cannot open it's own PID file on ubuntu 18.04

I was recently trying to run a nodejs app I created using pm2 and this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-18-04 ...
Jake t's user avatar
  • 127
0 votes
2 answers
2k views

Nginx PM2 NodeJS reverse-proxy with SSL gives HTTP 504

Once upon a good time, I had a good config for three NodeJs, socket.io API running on the same Ubuntu 16.4 LTS VPS server with PM2 for process managing and Nginx for reverse proxy to three different ...
Malek Boubakri's user avatar
1 vote
1 answer
1k views

Is my docker node application using all available CPUs?

I've got a node app built using a standard node-alpine docker image deployed to Azure App Service. The App Service Plan is set to use 2-core VMs (instance type S2). A single node process will only use ...
jiggy's user avatar
  • 123
4 votes
0 answers
3k views

Nginx, PM2, Node - No 'Access-Control-Allow- Origin' header

I have developed NodeJS server ran with express. I use PM2 to manage the application and then nginx to proxy requests to the application. My Express application has CORS, CSP etc set up. But, the ...
BugHunterUK's user avatar
2 votes
2 answers
552 views

Keeping server time in sync using ntpd

I understand ntpd has a -g option to allow a one time immediate clock set for large skews. Then the daemon runs and continuously adjusts. In the event of the skew becoming too large, the daemon exits ...
Elliot's user avatar
  • 121
1 vote
1 answer
4k views

NGINX - Serving a create-react-app application on one port and my api on another port

In my application i am using create-react-app and serving my site's frontend on the port 5000 by using "serve -s build" in a node pm2 process. I can get this working by using this configuration for my ...
Loggggy's user avatar
  • 11
0 votes
1 answer
707 views

PM2 Similar for Tomcat

Tomcat due to auto-of-memory or rare problem it stops, and needs to manually start the service back. Is there any simple Process manager like PM2 for Tomcat, to monitor and start when not running.
arvindwill's user avatar
1 vote
1 answer
6k views

"pm2 deploy production setup" command fails, Permission denied (publickey)

So I guess pm2 and SSH aren't configured correctly to work with each other on my machine. I'm perfectly able to SSH into my remote server manually using ssh user@hostname. The server is a ...
Jon Love's user avatar
1 vote
0 answers
576 views

Check if PM2 daemon is running and resurrect

There were some recent problems on Ubuntu server due to low RAM. The server didn't reboot but PM2 crashed. To avoid such situations in future, I'm looking for a way to check if PM2 daemon is running ...
Estus Flask's user avatar
2 votes
1 answer
914 views

Endless files with copytruncate option in logrotate

When I use logrotate with this configuration: /home/ubuntu/.pm2/logs/* { rotate 2 size 200k missingok notifempty compress delaycompress ...
Andy's user avatar
  • 151
-3 votes
1 answer
608 views

How you running more than one instance of parse on multi core servers?

I'm wondering if anyone is running something like pm2, forever or what ever to run more than one parse instance on servers that more than a few cores? If so can you provide any suggestions on ...
Steve's user avatar
  • 183
5 votes
0 answers
934 views

Nginx load balancer in front of pm2 with nodejs cluster [closed]

I'm trying to setup a production environment with a frontend running nginx and a backend with multiple nodejs applications using pm2 for process management. The idea is to allow horizontal ...
Jordifreek's user avatar
0 votes
2 answers
424 views

How migrate Parse Web App to my own Server

There are a lot of manuals for migrating Parse servers to different platforms but none of them say which kind of plugins and packages are needed for those web applications which work with Expressjs on ...
AmirModiri's user avatar
1 vote
2 answers
1k views

Upgrade node 0.12.x to nodejs 4.4.x using pm2

I use PM2 to run my node processes in production (on Ubuntu 14.04). After upgrading from node 0.12.x to nodejs 4.4.x, the command to run node(js) changed from node to nodejs. I followed the ...
steampowered's user avatar
0 votes
0 answers
1k views

pm2, sockets and permissions

I'm deploying a node.js app with PM2 behind an nginx reverse proxy. I want to run the PM2-managed app using a local socket, but there are a couple of obstacles. Firstly the app needs to be told ...
Synchro's user avatar
  • 3,230