Questions tagged [pm2-logrotate]

PM2 module to automatically rotate logs of processes managed by PM2.

For more information:

28 questions
0
votes
0 answers

Node Project has not ecosystem.js file, So where I can put this script in my node js project?

out_file: "/dev/null", error_file: "/dev/null" I want to disable PM2 logs stroe in my local machine and on the server too, I tried to put this in package.json file after "script : {}" key,but it didn't work for me?
0
votes
0 answers

Pm2 reload not working in "fork" or "fork_mode"

pm2 reload test.config.js --only api-dev //test.config.js module.exports = { apps : [{ name: "api-dev", script: "/home/developer/api-dev/source/dist/src/bin/www.js", instances: 4, exec_mode: "fork", //OR…
Ram
  • 3
  • 2
0
votes
0 answers

Pm2-health send to many emails when a process died

I am using pm2-health to trigger when a process was managed by pm2 died. But every time a process died, pm2-health send 11 emails about exception threw and 11 more emails about process has stopped. And when I manual stopped the process, pm2 health…
0
votes
1 answer

How to install pm2-logrotate

I am trying to install pm2-logrotate, sudo pm2 install pm2-logrotate I am getting [PM2][Module] Installing NPM pm2-logrotate module [PM2][Module] Calling [NPM] to install pm2-logrotate ... npm ERR! code EAI_AGAIN npm ERR! errno EAI_AGAIN npm ERR!…
aharo vishinsky
  • 131
  • 1
  • 4
  • 12
0
votes
0 answers

How to know when PM2 deploy status changes to "error"

Is there a way to notify a developer when the PM2 status of an application is showing "error"?
0
votes
1 answer

Write PM2 logs to dynamic log path

I'm using PM2 to manage my node js application. Here i want to configure custom log path which is unique to the server/node that pm2 is running module.exports = { apps : [{ name: 'nodeapp-dev', script: 'src/index.js', …
0
votes
1 answer

PM2 Logrotate does'nt turn every days - configuration

My node application is currently using pm2 for console logging, I need to create a logger that logs warnings and errors only and saves the logs to a log file. It should rotate interval and restarts every day of 01h00. This is my current pm2 config: …
Motra
  • 93
  • 1
  • 7
0
votes
1 answer

How to setup pm2-logrotate for docker with nodejs running pm2?

I have the docker image from keymetrics/pm2:8-jessie and running my nodejs application well with pm2. I tried to add pm2-logrotate for sizing the log with date. I added the following in my Dockerfile. The module pm2-logrotate can be started but the…
Rice
  • 155
  • 3
  • 11
0
votes
2 answers

pm2 crash with too many unstable restarts (16). Stopped. "errored" in python

I have created a script that can run the python django application. I run this script using pm2. I do pm2 start scripts.sh, it works properly but after some time my application doesn't work and displays an error like this the runtime process for…
Keyur Patel
  • 89
  • 4
  • 9
0
votes
1 answer

pm2 Daemon Dies After a Few Hours

I have a Node.js/Express app that implements a set of REST APIs and I'm attempting to use pm2 to manage its deployment. The app starts fine (using pm2 start ecosystem.config.js) and remains available for a few hours, but the pm2 daemon always dies…
0
votes
0 answers

pm2 not starting index.js server

I am running a nodejs server. When I run it with the command "node index.js" the app run fine. But when I run it using pm2 -> "pm2 start index.js" pm2 outputs that the app is online but it isn't. Also when I check about it using the command 'pm2…
Gaurav
  • 103
  • 1
  • 11
0
votes
1 answer

can't disable following express:* related pm2 logs?

I want to disable some logs (express:router) from express code which use pm2 to run. Current logs are as follows GMT express:router dispatching GET /healthcheck 10|consumer | Wed, 10 Oct 2018 19:40:04 GMT express:router query :…
0
votes
3 answers

PM2 Log Rotate Weekly Configuration

I'm so confused with the pm2-logrotate configuration, i need some help. I've search for documentation and googled with zero result. I just want to rotate the log every week. I've tried using pm2 set pm2-logrotate:rotateInverval 0 0 * * 0 but the log…
1
2