Skip to content

[Messenger] Gracefull stop messenger when ran in Docker FPM Image #43866

Closed
@Warxcell

Description

@Warxcell

Symfony version(s) affected

ALL

Description

Hello, we have web app which uses messenger.
We are using single image for web part and messenger, cronjobs.
The problem is that PHP-FPM doesn't quite follow the standard POSIX signals, so as work-around Docker image for PHP-FPM overrides STOP SIGNAL, which results in non-gracefull killing of containers with messenger, since Messenger only listens for SIGTERM.

My proposal is to make this configurable, and allow every person to choose on which signals to stop the worker.

How to reproduce

Build image which inherits php:${PHP_VERSION}-fpm-alpine, run it with entrypoint/cmd messenger, and run docker stop on that container.

Possible Solution

Make SIGNALS in StopWorkerOnSigtermSignalListener configurable. (SIGTERM by default)

Additional Context

Just give me a green light and I can start working on it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions