2,317
questions
0
votes
0
answers
20
views
Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available, while using vercel/pkg and pm2 in nodejs
I have a NodeJS CLI application built using commander, I am using vercel's pkg to create executables.
Now, I starting a localserver using express on a particular command like this:-
program
....
0
votes
1
answer
13
views
How to yarn start nextjs application on specific port with pm2?
How to yarn start nextjs application on specific port with pm2 process manager?
I googled for answer and found wrong suggestions
On production server I want to configure fail-over load balancer to ...
-1
votes
0
answers
25
views
NodeJs server becoming unresponsive [closed]
I'm running a Node.js server using PM2 in cluster mode on a machine with 8 cores. Occasionally, the application becomes completely unresponsive—no logs, no responses, nothing.
I've integrated ...
0
votes
0
answers
11
views
Dynamic RAM allocation with node.js
I have a node.js application being managed by pm2, the application allocates dynamic memory by default and is limited to using as little memory as possible and using memory if necessary. However, this ...
-5
votes
0
answers
23
views
Server Crash Controling the Node Js service or server [closed]
We're using a microservices architecture for one of our blockchain applications and need to keep records of ledger logs. The problem is that one of our services doesn't have a backend, and if it ...
0
votes
0
answers
16
views
NodeJs SplunkSDK Get Api getting 500 Internal server error before the actual response received
I am new to Node js. I am using NodeJS pm2 and [email protected]. Requirement is to get splunk data as a response.
module.exports.executeSearch = function (query, params, cb) {
...
0
votes
0
answers
44
views
how to achieve zero-downtime deployment with pm2
I have a project involving a YAML file for deployment, and the flow is as follows:
Pull Changes: The YAML file pulls all the changes.
Start Temporary Instance: It starts a temporary instance to handle ...
0
votes
0
answers
15
views
How to kill and reboot one server instance, after an new build/update, with a loadbalancing setup?
I have a server configuration which spins up 4 instances of my server using pm2 and a load balancing setup that routes traffic (all network requests, including socket traffic) to each of these ...
0
votes
0
answers
14
views
PM2 Restart issue
pm2 restart 0 --cron-restart="0 0 * * *"
Will this restart instance 0 everyday at midnight? Or is there a better way to do this?
I need to restart instance 0 once a day.
Also since I ran ...
0
votes
0
answers
28
views
env variables give undefined in production server in node js
I am working on a Node.js project that works perfectly on both my local and development servers. However, after moving the project to a live server, I am encountering an issue where environment ...
0
votes
0
answers
17
views
how to set up pm2 auto-resurrect after server reboot for multiple users
We have multiple apps on a server that are handled by pm2.
Every dev has his own server account and we are all in a group that can use the same pm2 instance.
The pm2 folder is in a shared folder.
When ...
0
votes
0
answers
31
views
PM2 and Nodejs App - Open app with exec not working
I have a nodejs app running on my local windows machine. I need to open an app, let's say notepad.
Here is the code
exec(`"${execPath}" ${args}`, {
windowsHide: true
}, (error, ...
0
votes
0
answers
33
views
Compiling and running Adonis app with pm2 (typescript)
I finally managed to compile (npx tsc) and execute my Adonis 6 typescript app with pm2:
When I check with pm2 list looks like everything is ok:
However, checking logs I see this error:
I am using ...
0
votes
0
answers
20
views
core files getting created how to stop it?
i wanted to know, how can i disable it or stop getting created the core files in my application path.
whenever i restart my application core.* files are getting created without causing any problem to ...
0
votes
0
answers
43
views
Catch unhandled exception in NodeJs child process
My NodeJs app forks 10 child processes on the start.
In every child process I have the next code:
process.on('unhandledRejection', (reason, promise) => {
log.error('Unhandled Rejection at:', ...
0
votes
0
answers
11
views
Why does `process.stdout.write` sometimes split lines in `pm2 log` output and how can I ensure atomic output?
I use process.stdout.write in the output of the program so that the output is in one line.
See this example:
while(true) {
process.stdout.write("X");
process.stdout.write("Y");
...
0
votes
0
answers
35
views
TypeError: e.map is not a function and also showing html code in browser console after deploying
Getting this html code:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" ...
1
vote
3
answers
210
views
How to deploy SvelteKit on your own server properly without interrupting the user?
So I created this information system with Sveltekit, Ubuntu 22.04 as the server OS, PM2 as the process manager and I'm running the app in Node.Js. I've read the Sveltekit documentation on how to build ...
0
votes
1
answer
30
views
PM2 is repeatedly showing Module Not Found, Required Stack
I am deploying a node app on vps server on godaddy and getting this issue when i run pm2, When i start the pm2 it shows me status online, within secs when i check the status again it shows me errored, ...
0
votes
0
answers
21
views
PM2 starts correctly in GitHub Actions workflow but not in SSH session – how to ensure consistent PM2 context?
on github actions this file is executing successfully by starting pm2 instance as service but when in login to my ssh server and run command "pm2 ls" it does not list any pm2 instance as ...
0
votes
0
answers
31
views
How can I resolve CORS (Cross-Origin Resource Sharing) errors in my NestJS API?
I have a mistake in a project on Nest JS deployed on EC2 with Nginx, when i make a call from an external frontend to the API the API returns CORS error.
Im checked docs, blogs, tutorial and dont work ...
0
votes
0
answers
23
views
Excel File handling feature gets unresponsive after few days usage of the web app
We have a web app in AWS EC2 (t3.large) with a feature that lets users upload Excel files from the web UI (compress and store files in an S3 bucket) and later on, shows the data in Excel in a web view ...
-1
votes
1
answer
52
views
Read node.js environment variables
I have a Node.js API that stores environment variables in a file called config.env.
When I am not using pm2, I launch the server with the following command: NODE_ENV=prod nodemon --env-file config.env ...
0
votes
1
answer
127
views
PM2 + Node.js + Ubuntu: Garbage collection does not work as expected
We are having problems with our Production Nuxt3 app. It runs on PM2 (cluster mode) on an ubuntu VPS. The memory usage keeps growing over time.
When run locally (Node and PM2 installed on Windows or ...
0
votes
0
answers
12
views
Why pm2 logs are being saved with root as owner?
I can perform all the pm2 commands with normal user, but to pm2 flush logs I need super user permissions.
I don't understand because the logs are being created at my home folder, but they have root ...
0
votes
0
answers
25
views
`pm2` related commands in [Server] and [GitHub actions] are completely independent
Run pm2 related commands in [server] and [github actions] respectively, and the results obtained are completely independent. I don't know what happened. Running pm2 delete all on [github actions] will ...
0
votes
1
answer
52
views
Using PM2 to start and stop at a particular time
Is it possible to setup pm2 to start a service at a certain time, and then kill it at a certain time. We have time apps that should only be accessible at certain times, and be turned off the rest of ...
0
votes
2
answers
271
views
Start Node.js with PM2 on Boot
The whole thing should only take 2 minutes, but of course it doesn't work for me.
I tried several versions of PM2 and ran it as root.
There were only success messages, but the corresponding service ...
1
vote
0
answers
31
views
Pm2 server is automatically turning off at any time on ssh of hostinger
0|blog-api | at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
0|blog-api | errno: -104,
0|blog-api | code: 'ECONNRESET',
0|blog-api | syscall: 'read',
0|blog-api | ...
0
votes
0
answers
20
views
Website shows 502 error after several minutes and comes back quickly
I have a NextJS project which was running smoothly until one day it constantly started to show 502 error. We use nginx and pm2 on the server. If you need any more info, please ask!
So here's what we ...
0
votes
0
answers
41
views
ERR_CONNECTION_CLOSED when http header size is too large
When calling my nuxt app with too many url params (worst case: URL is +/-8kb), I am getting no response. Instead, the ERR_CONNECTION_CLOSED error appears. The main suspect is Nginx, but I could not ...
0
votes
1
answer
56
views
Deploy a new version of a node app so new users can use the new version. with wild card subdomain in nginx
My main goal is to have new users use a new version of a node app and have the old users use the existing version(which will be an old version)
I use node js
I use Pm2 on Linux
A wild card server ...
0
votes
1
answer
63
views
Nuxt.js 3 website replaces with Unicode chars after build
I use Nuxt.js v3 for my website and PM2 server for my production. After I build Nuxt.js code with pnpm run build and start PM2 daemon with start ecosystem.config.cjs site works just fine.
But after ...
3
votes
1
answer
2k
views
PM2 - Current process list is not synchronized with saved list
I have a windows server where I have some code running. I am using pm2 to manage 2 processes on this server. Everything was working fine until a few weeks ago where I had a user rollback the server ...
0
votes
1
answer
117
views
How can I get PM2 to load a new cron_restart?
I have a PM2 server running an ecosystem config file with certain jobs using the cron_restart functionality. I had one job configured as 0 6 * * * (every day at 6:00) and changed it to 0 10 * * * (...
0
votes
0
answers
39
views
redis stack performance is down in ec2 , what to do?
I'm experiencing significant latency issues when deploying a Node.js server with a Redis stack on an m5.large EC2 instance. Locally, my response times are within the 40-80 milliseconds range, but ...
0
votes
0
answers
76
views
Deploying Next.js with pm2 - how to minimize project footprint?
I start to set up a pm2 deployment for a simple Next.js webpage.
If I do pm2 deploy production setup, the whole git repo is cloned to the server's webspace (into /public_html/source).
As Next.js is a ...
-1
votes
2
answers
44
views
PM2 command automation, how to manage permission
I installed node.js and npm on my Win server.
But i have problems with pm2.
I wanna automate the function of the PM2, so when the machine is restarted a Scheduled task resurrect PM2 status and restart ...
0
votes
0
answers
33
views
pm2 not found when using pm2 in jenkins pipeline on linux machine
When I am using this in jenkins pipeline, all of the commands get successfully executed except the last one "pm2 start ./config.json". the error is "bash: line 1: pm2: command not ...
0
votes
0
answers
23
views
Electron react app doesnt launch after installing, it keeps running in the background, how to make the app run on front?
I have created an app which uses react-electron for frontend, also in the same code i have integrated python using python-shell and i have also used pm2 module to run backend from the electron app ...
1
vote
1
answer
66
views
PM2 : GET request return ENAMETOOLONG
I am running VueJS app in Azure with PM2, i have an URL to connect to the app with JWT token.
URL example :
http://localhost:8080/login/sso/eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJQUjAwMTYifQ.BrPtb-6T5MlpmuE-...
0
votes
1
answer
25
views
How to run binary without using `yarn run` (using pnp - no node_modules)
I'm looking for an alternative how to run next binary without calling yarn. Basically I'm trying to avoid calling yarn run next start (because I cannot access yarn in pm2 cluster mode).
I'm using PnP ...
0
votes
0
answers
49
views
How to fully refresh PM2 environment variables without "kill" command?
My old ecosystem.config.js file had these env variables
module.exports = {
apps: [
{
name: 'test_app',
script: './bin/www',
env: {
GENERIC_VALUE: 'old value',
...
0
votes
0
answers
15
views
pm2 start a new version of app without stopping the running one
I have an app that is already started in PM2, now I want PM2 to be restarted with a new version of this app, meanwhile, it takes some time to build and serve the app.
the current behavior is that PM2 ...
0
votes
1
answer
229
views
Nginx Continuously Failing With Result 'Signal'
I'm doing some work and we have a machine setup on DigitalOcean 5.15.0-100-generic #110-Ubuntu, and it's serving multiple NextJS frontends and a NodeJS backend thruogh PM2 on different localhost ports,...
0
votes
0
answers
59
views
pm2 not startng a nodejs express application properly on AWS EC2 AmazonLinux2
I have an AWS EC2 instance running AmazonLinux2, where I want to launch a nodejs express application. Everything worked fine until I had to run the appplication with PM2 with sudo, as I am running it ...
0
votes
0
answers
24
views
pm2 setup command stops at the first step. How to make it work?
I call the command "pm2 deploy ecosystem.config.js staging setup" and its execution stops at the "hook pre-setup" stage. The SSH key of my ec2 container is added to the repository ...
0
votes
0
answers
82
views
instances of pm2 crashes during error "write EPIPE" one after another
pm2 version 5.3.1, application in cluster mode, 7 instance Periodically after an error:
Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:87:16)
...
0
votes
1
answer
36
views
How to use Pm2 for deferent Port in NextJS app
I Have Purchased A VPS For My Nextjs App
I Hosted one NextJs App in my VPS using pm2 Port 3000
Now I want to Host Another NextJs app in same VPS in Port 3001 the website show me 502 Bad Gateway nginx ...
0
votes
0
answers
21
views
Running old apirest & give error node_modules/pirates
I use hapijs and pm2, and when i do "pm2 start app.js" and pm2 log server i give this:
0|server | SyntaxError: Unexpected token '?'
0|server | at wrapSafe (internal/modules/cjs/loader....