How to specify dynamic config

As mentioned in the post, I am trying to tune temporal performance by adding a dynamic config. But it always gives the following error:

{"level":"info","ts":"2020-11-24T20:25:52.101Z","msg":"Error creating file based dynamic config client, use no-op config client instead.","error":"failed to decode dynamic config yaml: unmarshal errors:\n line 2: cannot unmarshal !!map into []*dynamicconfig.constrainedValue","logging-call-at":"server.go:129"}

Here is the docker-compose snippet:

  temporal:
    image: temporalio/auto-setup:${SERVER_TAG:-1.3.1}
    volumes:
      - ${DYNAMIC_CONFIG_DIR:-/etc/temporal/config/dynamicconfig}:/etc/temporal/config/dynamicconfig
    environment:
      DB: "mysql"
      DB_PORT: "3306"
      MYSQL_USER: "root"
      MYSQL_PWD: "root"
      MYSQL_SEEDS: "mysql"
      DYNAMIC_CONFIG_FILE_PATH: "/etc/temporal/config/dynamicconfig/poc.yaml"
    depends_on:
      - mysql

Contents of /etc/temporal/config/dynamicconfig/poc.yaml inside the docker is the same as this dynamicConfig.

Any pointers to troubleshoot this further will be appreciated.

1 Like

Looks like your yaml file has syntax errors. Have you tried replacing poc.yaml with the original one which comes by default?

This is the contents of the yaml file you linked:

server:
  dynamicConfig:
    matching.numTaskqueueReadPartitions:
    - value: 5
      constraints: {}
    matching.numTaskqueueWritePartitions:
    - value: 5
      constraints: {}

Keep in mind that that is a helm chart value. The yaml file itself should only contain the section under dynamicConfig. Thus, your poc.yaml should not have a ‘server’ or ‘dynamicConfig’ field. Instead it should be like so:

matching.numTaskqueueReadPartitions:
- value: 5
  constraints: {}
  matching.numTaskqueueWritePartitions:
- value: 5
  constraints: {}

Thanks. I will try this out.

This worked. Thanks.

But the change did not help to increase the worker throughput. I will start another thread for this.