-
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
3.2.x cluster processes unable to bind to tcp listener port #3943
Comments
same issue :( |
I faced the similar issue when updated from v3.1.3 to v3.2.0: the app starts fine but it doesn't release a port on reload. So I defined |
wip |
I've missed that point.... I've disabled 'max' || 0 instances test because travis sometime has a ton of CPU. Once travis goes green I will hot publish this fix, expect it in one hour |
deployed: $ npm install pm2@latest -g
$ pm2 update |
@Unitech Hello, this issue seems to be about But you seemed to have closed the issue after fixing an unrelated bug (setting Am I misunderstanding? Note I am on 3.2.2 and have experienced the Thank you |
"So I defined exec_mod in my config file as 'cluster_mode'" not work |
What's going wrong?
When starting pm2 in cluster mode on a multi-core machine, only one process is able to bind to a TCP listening port (express listen), the other processes report an Error: listen EADDRINUSE
Started using:
pm2 start app.js --name myname --no-daemon -i max
This appears to start 4 processes in fork mode with pm2 3.2.x, but it starts for processes in cluster mode in pm2 3.1.3
How could we reproduce this issue?
mkdir pm2test
cd pm2test
npm init
npm install express
npm install pm2@3.2
app.js:
./node_modules/.bin/pm2 start app.js --name myname --no-daemon -i max
./node_modules/.bin/pm2 kill
npm install pm2@3.1.3
./node_modules/.bin/pm2 start app.js --name myname --no-daemon -i max
./node_modules/.bin/pm2 kill
Supporting information
The text was updated successfully, but these errors were encountered: