Skip to content

multiple workers in a multi-tentant app mix up #1490

@henderkes

Description

@henderkes

What happened?

{
    grace_period 3s
    frankenphp {
        num_threads 32
        max_threads 128
        worker {
            file /var/www/app/public/index.php
            num 16
            env APP_ENV one
        }
        worker {
            file /var/www/app/public/index.php
            num 16
            env APP_ENV two
        }
    }
}

one.example.com {
    root * /var/www/app/public/
    ...
    php_server {
        env APP_ENV one
    }
}

two.example.com {
    root * /var/www/app/public/
    ...
    php_server {
        env APP_ENV two
    }
}

Both one.example.com and two.example.com will now use the environment variables of environment "two".

I'm fairly certain that this was not the case some time ago. Creating symlinks for one and two to app and changing the worker paths is a workaround.

Build Type

Affects all build types (docker, static, static-gnu).

Worker Mode

Yes

Operating System

GNU/Linux

CPU Architecture

x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions