-
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
Downtime when using reload and wait_ready #2478
Comments
Alright, the stop/SIGINT/wait ready/reload functions has been refactored and are working much better. Could you please have another try:
For long exit (like in your example > 10s), make sure your increase the
|
Thanks for the quick response! I didn't get it to work with the However, I managed to get zero downtime reloads with the following command: Log output produced by the second command:
|
--listen-timeout overrides the PM2_GRACEFUL_TIMEOUT (here) You should not pass extra options to the CLI (pm2 start ecosystem.conf.js). module.exports = {
apps : [{
name : "HTTP",
script : "http.js",
listen_timeout: 10000,
exec_mode : 'cluster',
wait_ready : true
}]
} With JMeter and your test scenario, what was the displayed result in the interface when you succeed to gracefully reload your app? Thanks! |
I tried editing Here are the logs:
Specifically, what I'm looking at in JMeter is the Here's my full app:
Command: |
@bjrnt Could you try with |
@vmarchaud Getting the same results with graceful reloading. Logs
|
In reference to you app.js and ecosystem.conf.js could you do: $ pm2 kill
$ pm2 start ecosystem.conf.js
$ pm2 reload ecosystem.conf.js And see with a clean environment if it reload without issue |
Just tried the exact same example with wrk, it works (pm2@2.1.3) |
Patch available on pm2@2.1.4 (main): $ npm install pm2 -g
$ pm2 update |
Expected behaviour
When
pm2 startOrReload ./ecosystem.json
runs, pm2 starts new nodes then waits for them to come online, and then kills the old ones.Actual behaviour
pm2 kills the old nodes right away, two new ones are started, but since there's a delay until they come online, there is downtime.
(Taken from Apache JMeter, error % here shows that the server was unreachable for some time)
Steps to reproduce
app.js
ecosystem.json
Run
pm2 startOrReload ./ecosystem.json
twice.Software versions used
PM2 Log output
As you can see, both
app id:1
andapp id:0
are disconnected before the new nodes are online.Also even though it says the app existed via signal
SIGINT
, the handler inapp.js
was never run.The text was updated successfully, but these errors were encountered: