Skip to content

PM2_GRACEFUL_LISTEN_TIMEOUT/listen_timeout not working correctly #2956

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

Closed
cdm6a opened this issue Jun 21, 2017 · 4 comments
Closed

PM2_GRACEFUL_LISTEN_TIMEOUT/listen_timeout not working correctly #2956

cdm6a opened this issue Jun 21, 2017 · 4 comments

Comments

@cdm6a
Copy link
Contributor

cdm6a commented Jun 21, 2017

So I'm attempting to use wait_ready with listen_timeout in my app but it appears as if the listen_timeout is not actually working as expected.

When attempting to see if it works as expected using the example (https://github.com/Unitech/pm2/tree/master/examples/wait-ready), it doesn't appear to be the case either.

The specific behavior that appears to be broken is even after the listen_timeout expires, pm2 still waits.

Steps to reproduce:

  1. Modify the listen_timeout to be 1000
  2. PM2 will wait the 15 seconds in the setTimeout of app.js before displaying the status as oppose to only waiting the 1000 ms.

I've also tested this using fork mode as well. Is my understanding of this feature correct in that it should stop waiting and report an error status once listen_timeout is exceeded?

PM2 version: 2.5.0
Node version: 6.9.0
Mac and RHEL7
@Unitech Unitech added the T: Bug label Jun 26, 2017
@Unitech
Copy link
Owner

Unitech commented Jun 26, 2017

Bug reproduced, seems like there is something missing

@Unitech
Copy link
Owner

Unitech commented Jun 26, 2017

Fixed, you can try the fix:

$ npm install Unitech/pm2#development -g
$ pm2 update

@cdm6a
Copy link
Contributor Author

cdm6a commented Jun 26, 2017

Thanks @Unitech, any idea when the next release will go out?

@Unitech
Copy link
Owner

Unitech commented Jul 20, 2017

Published on PM2 2.6.0:

$ npm install pm2@latest -g
$ pm2 update

@Unitech Unitech closed this as completed Jul 20, 2017
inerc pushed a commit to inerc/pm2 that referenced this issue Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants