Skip to content

Handle graceful shutdown on Heroku #3415

Closed
@pietroalbini

Description

@pietroalbini

While the crates.io codebase gracefully shuts down when it receives a SIGINT or a SIGTERM, that doesn't work when running the application in production on Heroku. Now that DownloadsCounter landed in #3413 handling graceful shutdowns is actually needed, otherwise we'll lost up to a minute of download counts when restarting a dyno.

This seems to be caused by Heroku sending SIGTERM to all processes 30 seconds before killing the dyno and nginx forcefully shutting down after it receives the signal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions