Skip to content

Support for graceful shutdown / DB conn. termination? #20

Description

@wh4everest

The PG pool opens connections towards the database. When the app is killed, or when a script finishes, these aren't gracefully terminated and we get these messages:

db_1          | 2019-03-12 12:55:42.030 UTC [9527] xxx@xxx LOG:  could not receive data from client: Connection reset by peer
db_1          | 2019-03-12 12:55:42.030 UTC [9528] xxx@xxx LOG:  could not receive data from client: Connection reset by peer
db_1          | 2019-03-12 12:55:42.033 UTC [9529] xxx@xxx LOG:  could not receive data from client: Connection reset by peer

This isn't causing functional problems, but it's not ideal either.

There are other examples where we want to react to the termination of the program -- maybe stop accepting new requests and wait for active ones to finish?

What would be the correct way for the framework to support graceful shutdowns?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendenhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions