https://prefect.io logo
Title
g

GuangSheng Liu

06/16/2022, 7:16 AM
Hello, i want to overwrite this configuration by using environment variables.So which one is correct? Thanks!
export PREFECT__SERVICES__SERVICES__TOWEL__MAX__SCHEDULED__RUNS__PER__FLOW=1
or
export PREFECT__MAX__SCHEDULED__RUNS__PER__FLOW=1
a

Anna Geller

06/16/2022, 11:07 AM
I'd say: PREFECT__SERVICES__TOWEL__MAX_SCHEDULED_RUNS_PER_FLOW
g

GuangSheng Liu

06/16/2022, 1:33 PM
i set ~/.prefect/config.toml like this
[server]
    [server.ui]
    port = "8081"
    host_port = "8081"

[services]

    host = "0.0.0.0"

    [services.towel]
    max_scheduled_runs_per_flow = 1
ui port change is ok, but max_scheduled_runs_per_flow doesn’t work, still has 10 upcoming runs
k

Kevin Kho

06/16/2022, 2:28 PM
What is your Prefect version?
g

GuangSheng Liu

06/17/2022, 1:54 AM
1.2.2
k

Kevin Kho

06/17/2022, 2:19 AM
Did you re-deploy server? You need to de-redeploy for these changes to take effect
g

GuangSheng Liu

06/17/2022, 2:34 AM
yes, re-deploy server already, but still doesn't work
k

Kevin Kho

06/17/2022, 2:55 AM
Did you deploy with helm or
prefect server start
?
g

GuangSheng Liu

06/17/2022, 2:59 AM
use prefect server start
k

Kevin Kho

06/17/2022, 2:40 PM
Prefect server start should definitely use that and it seems like the right place. Do you potentially have an env var set also?
Or another config.toml?
v

Vincent Chéry

09/06/2022, 3:20 PM
Same for me, changes in the [services] section don't seem to be picked up by server (using 1.3).
Lookin at the code it seems that these values are not passed to server when running
prefect server start
, so the values hard coded in https://github.com/PrefectHQ/server/blob/5d2c538dac3c246fcafc1ec2556f46bdf987f0fc/src/prefect_server/config.toml#L85 are used.
I tried to launch server and then change the value in the towel container (
docker exec -it
intothe container then modify the config.toml file using python), but that does not work either, since the config is loaded only once during start-up.