Skip to content

[Process] Add SYMFONY_PROCESS_IDENTIFIER env var to all processes #61069

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

Open
wants to merge 3 commits into
base: 7.4
Choose a base branch
from

Conversation

richardhj
Copy link
Contributor

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix NA
License MIT

This PR adds seeds a new environment variable named SYMFONY_PROCESS_IDENTIFIER to all created processes.

What is the motivation?

If you spawn multiple sub processes, you might want something that uniquely differentiates them.
To give an example, I like to refer to the Symfony messenger, which is a component usually utilizing multiple php processes / or workers (they might be managed by supervisord or from the main app, which is the case for Contao CMS; also see contao/contao#8527)

The Symfony docs states:

There should never be more than one messenger:consume command running with the same combination of stream, group and consumer, or messages could end up being handled more than once. If you run multiple queue workers, consumer can be set to an environment variable, like %env(MESSENGER_CONSUMER_NAME)%, set by Supervisor (example below) or any other service used to manage the worker processes.

We think, this is a universal requirement and might be considered added to Symfony.

@carsonbot carsonbot changed the title Add SYMFONY_PROCESS_IDENTIFIER env var to all processes [Process] Add SYMFONY_PROCESS_IDENTIFIER env var to all processes Jul 9, 2025
@OskarStark OskarStark changed the title [Process] Add SYMFONY_PROCESS_IDENTIFIER env var to all processes [Process] Add SYMFONY_PROCESS_IDENTIFIER env var to all processes Jul 9, 2025
@nicolas-grekas
Copy link
Member

Not sure this makes sense to me for every single process. Can't you deal with this on your side if you need it?

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

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy