Questions tagged [pm2]
The pm2 tag has no usage guidance.
43
questions
0
votes
1
answer
45
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 (...
0
votes
0
answers
26
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 ...
0
votes
0
answers
197
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 ...
0
votes
0
answers
361
views
Uptime Kuma - Server not loading CSS changes
So I'm trying to change the title on the dashboard from "Uptime Kuma" to something else Example: link to the temporarily changed title via devtools from "Uptime Kuma" to something ...
0
votes
0
answers
204
views
Restarting PM2 when the latency of the API it's serving becomes high
I have an EC2 instance running which is housing a nodeJS/GraphQL based API application. The application is managed via PM2.
I want to have a setup/configuration which can continuously ping one ...
0
votes
1
answer
474
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 : "/...
0
votes
1
answer
165
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 ...
2
votes
0
answers
656
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 ...
0
votes
0
answers
593
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 ...
0
votes
0
answers
4k
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 ...
0
votes
1
answer
896
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 ...
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 ...
0
votes
1
answer
77
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 ...
0
votes
2
answers
10k
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 ...
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 ...
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 ...
0
votes
1
answer
1k
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 ...
0
votes
2
answers
856
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/...
0
votes
2
answers
5k
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 ...
0
votes
1
answer
113
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 ...
0
votes
0
answers
331
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....
1
vote
0
answers
644
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 ...
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 ...
1
vote
1
answer
10k
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....
0
votes
1
answer
1k
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 ...
1
vote
1
answer
142
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 ?
0
votes
1
answer
649
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/...
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",
"...
0
votes
0
answers
3k
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
...
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 ...
1
vote
1
answer
968
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 ...
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 ...
2
votes
2
answers
535
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 ...
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 ...
0
votes
1
answer
668
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.
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 ...
1
vote
0
answers
478
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 ...
2
votes
1
answer
836
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
...
-3
votes
1
answer
607
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 ...
5
votes
0
answers
921
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 ...
0
votes
2
answers
422
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 ...
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 ...
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 ...