Skip to content
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

Increase kill_timeout and stop dbPool on server close #113

Closed
jfoclpf opened this issue Apr 29, 2024 · 0 comments
Closed

Increase kill_timeout and stop dbPool on server close #113

jfoclpf opened this issue Apr 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jfoclpf
Copy link
Collaborator

jfoclpf commented Apr 29, 2024

  1. By default, pm2 waits 1600ms before sending SIGKILL signal if the applications doesn’t exit itself. This is not enough.
module.exports = {
  apps: [{
    name: "app",
    script: "./app.js",
    kill_timeout: 1600,
  }]
}

Increase to 6000ms

  1. Also close dbPool upon server close with SIGINT

https://pm2.keymetrics.io/docs/usage/signals-clean-restart/
https://pm2.io/docs/runtime/best-practices/graceful-shutdown/

@jfoclpf jfoclpf added the enhancement New feature or request label Apr 29, 2024
jfoclpf added a commit that referenced this issue May 5, 2024
jfoclpf added a commit that referenced this issue May 5, 2024
@jfoclpf jfoclpf closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant