-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cluster mode and EADDRINUSE #4225
Comments
Tahy, thanks for posting this issue here and hope we can solve it once for all. If anyone can help, give any points, would mean a lot to us. |
To add more to above post, it's really weird the error goes to |
I tried
The process exits but does not restart either. Really fraustrating experience. Also:
Without cross-env (and yarn/npm script together)However, today I tried a different script as well, previously the start script had I used this code to run, NODE_ENV=production pm2 start build-api/main.js --name=api --instances=2 We need I am not sure how it will behave without |
I was also having this issue and I was able to fix it by running I confirmed that this permanently fixed the issue by running |
I have the same issue for very long time on all my projects. my pm2.config.js: module.exports = {
/**
* Application configuration section
* http://pm2.keymetrics.io/docs/usage/application-declaration/
*/
apps: [
{
name: 'media-app',
script: 'npm',
args: "run serve",
exec_mode: 'cluster_mode',
exec_interpreter: 'node',
wait_ready: true,
listen_timeout: 10000,
instances: 2,
max_memory_restart: '200M',
max_restarts: 2, // if restarts this many times in min_uptime time, app is considered errored and will not start
min_uptime: 5000,
watch: false,
log_date_format: 'YYYY-MM-DD HH:mm Z',
env: {
NODE_ENV: 'production',
},
},
],
}; in git hooks/post-receive I have this:
It fails consistently after each reload. What I do to fix it after each reaload:
This issue deservers a fix after years of not functioning properly. |
I was getting this same error when I tried to cluster my app that was already running with PM2. I deleted the running instance and started it again using the cluster param and no more errors! |
I am having the same problem. I even tried uninstalling and reinstalling pm2, deleting all the old files .pm2 folder but i still get EADDRINUSE error in cluster mode.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is this fixed in newer versions? Experienced it on a production website after restarting pm2 with an ecosystem file and experienced a bunch of downtime |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
For those who are still experiencing this issue, I found that you can't run an e.g. if you have a Next app that runs: "script": "npm",
"args" : "start", you should replace it with a call to the script directly: "script": "./node_modules/.bin/next",
"args" : "start", |
This might be a duplicate issue however all linked issues are not able to resolve this issue I am having right now with the particular build version of https://github.com/vanila-io/spectrum.
What's going wrong?
EADDRINUSE
, status is stillonline
.online
.exec_mode
does not work.cluster
tocluster_mode
does not work.How could we reproduce this issue?
Unfortunately this happens on a production version, not on a development version. I have zero clues about reproduction right now.
Supporting information
Here is the
process.json
file, I tested withcluster
andcluster_mode
stated on #3946 (comment) .In sum:
exec_mode
does not work.cluster
tocluster_mode
does not work.EADDRINUSE
, status is stillonline
.online
.All related issues are either open or does not resolve this issue,
The text was updated successfully, but these errors were encountered: