Hello
I am doing a temporal deployment using Nomad + Consul (Hashicorp). Just for context, Nomad is a container orchestrator which can be seen as an alternative to Kubernetes. Till v1.11.4, things seem to be working all fine, but on v1.12.0 or v1.12.1, I am seeing extremely high CPU usage (4000%) on the matching service. From debug logs, it seems that there is some kind of an infinite loop kind of situation happening.
{"level":"debug","ts":"2021-09-27T04:09:02.367Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.372Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.376Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.380Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.384Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.389Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.397Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.411Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.423Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.483Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.488Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.492Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.497Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.501Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.505Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.509Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.517Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxOutstandingPolls","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.534Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.548Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.605Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.609Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.613Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.617Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.621Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.626Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
{"level":"debug","ts":"2021-09-27T04:09:02.634Z","msg":"Failed to fetch key from dynamic config","key":"matching.forwarderMaxChildrenPerNode","error":"unable to find key","logging-call-at":"config.go:67"}
For the matching service docker container, my nomad config passes the following environment variables
env {
KEYSPACE = var.keyspace
VISIBILITY_KEYSPACE = var.visibility_keyspace
SKIP_SCHEMA_SETUP = true
NUM_HISTORY_SHARDS = var.history_shard_count
SERVICES = "worker"
LOG_LEVEL = var.log_level
DYNAMIC_CONFIG_FILE_PATH = "config/dynamicconfig"
TEMPORAL_BROADCAST_ADDRESS = "${attr.unique.network.ip-address}"
BIND_ON_IP = "0.0.0.0"
PUBLIC_FRONTEND_ADDRESS = "${NOMAD_UPSTREAM_ADDR_temporal_frontend_grpc}"
}
The file config/dynamicconfig
does not exist as of now. I had just kept it in case I need to use it in future, but I’ve found the environment variables sufficient to do the configuration.