Questions tagged [pm2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 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 ...
user avatar
0 votes
0 answers
14 views

How can i solve this CORS problems?

I've deployed the same backend code node.js (test site and production site) on the same Nginx server and separated it by virtual-host. I've no problem when connecting to a test part. However, when I ...
user avatar
0 votes
0 answers
11 views

serving react out folder with "pm2 serve"

Hope you are doing great. We have one react(NextJS) app, we used yarn export to build an out folder. When I am serving a out folder with command "pm2 serve out/ port --name "react-app", ...
user avatar
0 votes
0 answers
27 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 ...
user avatar
0 votes
0 answers
20 views

Nginx Plus, PM2 Plus, or Both

My company has a few node/express apps that I would like to get some sort of monitoring set up for. Currently, they are all being run with PM2 in cluster mode, then using Nginx as a reverse proxy/...
user avatar
0 votes
0 answers
289 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 ...
user avatar
  • 101
0 votes
1 answer
199 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 ...
user avatar
  • 101
0 votes
0 answers
108 views

Fluentd unable to parse Json logs generated from node pm2 server

I am using fluentd, Elasticsearch and Grafana stack for logging and monitoring setup. I am tailing the logs(in JSON format) coming from NodeJS container/pod deployed in EKS cluster and dumping into ...
user avatar
  • 1
0 votes
0 answers
15 views

Deployer task with $options?

I'm using deployer (https://deployer.org/docs/6.x/tasks) to deploy my laravel application and it works like a charm. However, I want to make it more pretty. Why? Because I have background NodeJS ...
user avatar
  • 984
0 votes
1 answer
195 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 ...
user avatar
0 votes
1 answer
57 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 ...
user avatar
0 votes
0 answers
2k 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 ...
user avatar
  • 101
2 votes
1 answer
567 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 ...
user avatar
0 votes
2 answers
1k 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 ...
user avatar
  • 1
0 votes
1 answer
561 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 ...
user avatar
  • 103
0 votes
2 answers
90 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/...
user avatar
0 votes
2 answers
2k 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 ...
user avatar
0 votes
1 answer
92 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 ...
user avatar
0 votes
0 answers
123 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....
user avatar
1 vote
0 answers
407 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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
  • 984
1 vote
1 answer
5k 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....
user avatar
  • 11
0 votes
1 answer
605 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 ...
user avatar
  • 782
1 vote
1 answer
102 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 ?
user avatar
0 votes
1 answer
212 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/...
user avatar
1 vote
1 answer
785 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", "...
user avatar
0 votes
0 answers
2k 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 ...
user avatar
  • 127
0 votes
2 answers
1k 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 ...
user avatar
1 vote
1 answer
834 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 ...
user avatar
  • 123
4 votes
0 answers
2k 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 ...
user avatar
2 votes
2 answers
520 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 ...
user avatar
  • 121
1 vote
1 answer
3k 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 ...
user avatar
  • 11
0 votes
1 answer
523 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.
user avatar
1 vote
1 answer
5k 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 ...
user avatar
1 vote
0 answers
296 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 ...
user avatar
0 votes
1 answer
559 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 ...
user avatar
  • 121
-3 votes
1 answer
586 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 ...
user avatar
  • 183
5 votes
0 answers
804 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 ...
user avatar
0 votes
2 answers
410 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 ...
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 ...
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 ...
user avatar
  • 2,968