pm2

How can I start a java application with parameters using a pm2 config file?

牧云@^-^@ 提交于 2021-02-11 13:45:03
问题 I'm trying to start graphhopper using pm2 ... graphhopper is a java application and the way I initiate it on the terminal is by going to its folder and entering the following command: java -jar matching-web/target/graphhopper-map-matching-web-1.0-SNAPSHOT.jar server config.yml This application works fine running from the command line, but I haven't succeeded on running it as a service with pm2 . The config file I'm using is this one ( pm2 start config.json ): { "apps":[ { "name":"graphhopper"

GitHub Actions workflow error: Run Command Timeout! Even if the script did well

◇◆丶佛笑我妖孽 提交于 2021-02-09 01:44:16
问题 I want to deploy my Nuxt.js application on my remote server each time I commit into repository. Here is my deploy.yml: name: 'Deployment' on: push: branches: ['master'] jobs: deploy: name: Deploy runs-on: ubuntu-latest steps: - name: Connect to SSH uses: appleboy/ssh-action@master with: host: webhostgb.com username: root key: ${{ secrets.PRIVATE_KEY }} port: 22 script: | cd whgb-new git pull origin master npm run build fuser -kn tcp 3000 pm2 restart deploy.sh Basically deploy.sh runs npm

GitHub Actions workflow error: Run Command Timeout! Even if the script did well

梦想与她 提交于 2021-02-09 01:41:57
问题 I want to deploy my Nuxt.js application on my remote server each time I commit into repository. Here is my deploy.yml: name: 'Deployment' on: push: branches: ['master'] jobs: deploy: name: Deploy runs-on: ubuntu-latest steps: - name: Connect to SSH uses: appleboy/ssh-action@master with: host: webhostgb.com username: root key: ${{ secrets.PRIVATE_KEY }} port: 22 script: | cd whgb-new git pull origin master npm run build fuser -kn tcp 3000 pm2 restart deploy.sh Basically deploy.sh runs npm

winston + PM2 logging uncaughtException twice

无人久伴 提交于 2021-02-06 13:57:11
问题 I am using winston for my NodeJS apps, to have a structured logging format (JSON) that later I will process and send to Logstash via Filebeat. As suggested by PM2 and 12factor.net I'm logging using winston.transports.Console transport and letting PM2 to handle the stdout and stderr in my ecosystem.json . In my logger.js module I have the following: "use strict"; const winston = require("winston"); // Remove logging on console winston.remove(winston.transports.Console); // env const env =

Windows: Auto start PM2 and node apps

爱⌒轻易说出口 提交于 2021-02-05 13:04:01
问题 At a Windows AWS server i have a NODE app and i'm using PM2 to launch the app I have tried the NPMs: "pm2-windows-startup" and "pm2-windows-service" But after i restart my AWS instance and run PM2 ls No node app shows up in the list... I followed the instructions ... Installed the NPM (So PM2 auto start after reboot) PM2 start myApp.js --name mySuperApp PM2 save Reboot PM2 ls --> no running node apps? :-( The PM2 logs dont contain any thing... I have not added any ENV variables explicit (when

Windows: Auto start PM2 and node apps

可紊 提交于 2021-02-05 13:03:39
问题 At a Windows AWS server i have a NODE app and i'm using PM2 to launch the app I have tried the NPMs: "pm2-windows-startup" and "pm2-windows-service" But after i restart my AWS instance and run PM2 ls No node app shows up in the list... I followed the instructions ... Installed the NPM (So PM2 auto start after reboot) PM2 start myApp.js --name mySuperApp PM2 save Reboot PM2 ls --> no running node apps? :-( The PM2 logs dont contain any thing... I have not added any ENV variables explicit (when

react native app with nodejs as my backend and postgres as my database

本小妞迷上赌 提交于 2021-02-05 09:23:07
问题 I have successfully connected my nodejs backend and my PostgreSQL database to my ubuntu server. I have also installed nginx as a reverse proxy and it is working when i access the public ip address on the browser. When i cd to my backend folder that contains my index.js and do sudo node index.js: i get Server started on port 9000... Executing (default): SELECT 1+1 AS result Database Connected... and on my IOS simulator, my posts and everything get loaded correctly. My problem is when i close

PM2 - Incorrect memory usage reading & possible memory leak with Node.js application

别等时光非礼了梦想. 提交于 2021-02-05 06:21:09
问题 When my node js server is running via pm2, it has a higher memory usage reading than the actual memory heap in the application when inspected in DevTools. More so, the value under memory in pm2 slowly increases over time, possibly indicating some kind of memory leak. This slow increase in memory usage also cannot be observed in DevTools. Any explanation and/or solutions to these two (seemingly) strange occurrences? This is my DevTools This is pm2 list here is my javascript code var SSE =

pm2 Daemon Dies After a Few Hours

与世无争的帅哥 提交于 2021-01-29 21:01:59
问题 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 eventually without any errors in the logs. A few notes: I'm running in a CentOS 7 shared hosting environment. The /var/log directory is empty and journalctl doesn't return any entries. I've verified that the system isn't rebooting. The only pm2

pm2 Daemon Dies After a Few Hours

◇◆丶佛笑我妖孽 提交于 2021-01-29 18:32:03
问题 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 eventually without any errors in the logs. A few notes: I'm running in a CentOS 7 shared hosting environment. The /var/log directory is empty and journalctl doesn't return any entries. I've verified that the system isn't rebooting. The only pm2