Skip to content

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

@wh4everest

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?

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