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

Catch SIGTERM for graceful shutdown #3266

Merged
merged 1 commit into from
Nov 4, 2017
Merged

Catch SIGTERM for graceful shutdown #3266

merged 1 commit into from
Nov 4, 2017

Conversation

Rillke
Copy link
Contributor

@Rillke Rillke commented Oct 16, 2017

Shut down database connection and exit the node process
when SIGTERM is encountered. This is especially important
when nodejs is run as PID1, e.g. in a docker container.

Shutting down connections to clients (browsers) is beyond
this patche's scope.

Resolves #3265

Shut down database connection and exit the node process
when SIGTERM is encountered. This is especially important
when nodejs is run as PID1, e.g. in a docker container.

Shutting down connections to clients (browsers) is beyond
this patche's scope.

Resolves #3265
@Rillke
Copy link
Contributor Author

Rillke commented Oct 16, 2017

Note this also affects "normal" non-docker installations: When SIGTERM is received, 2 additional log lines display: "graceful shutdown ..." and "db successfully closed." Though, I think it is generally a good idea to perform graceful shutdowns, closing connections and writing buffers to disk.

I am by no means a UNIX or Etherpad professional so please double-check.

@Rillke
Copy link
Contributor Author

Rillke commented Oct 16, 2017

Agreeing to and signing Apache Contributor license.

@lpagliari lpagliari merged commit f12debd into ether:develop Nov 4, 2017
@lpagliari
Copy link
Contributor

Thanks!

@Rillke Rillke deleted the rr/2017/SIGTERM branch December 29, 2017 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants