How should I fix Hashicorp Consul using 100% CPU?

I downloaded and installed Hashicorp Consul from https://releases.hashicorp.com/consul/1.13.3/consul_1.13.3_linux_amd64.zip

I am using Linode as Consul Server and this is the configuration:

{
"node_name":"linode",
"bootstrap": true,
"bootstrap_expect": 1,
"bind_addr": "{{GetInterfaceIP \"as0t0\"}}",
"client_addr": "172.27.224.1 {{ GetPrivateIPs }}",
"advertise_addr": "172.27.224.1",
"ui_config": {
  "enabled": true
},
"server": true,
"rejoin_after_leave": true,
"skip_leave_on_interrupt": true,
"primary_datacenter":"mydc",
"acl_default_policy":"allow",
"acl_down_policy":"extend-cache",
"datacenter":"mydc",
"encrypt":"FYuSUowlx2qf70bigvzxihKsHs5SCbNVFuml5GMyHqY=",
"data_dir":"/opt/consul/data",
"server":true
}

and this is the Systemd Service unit:

[Unit]
Description="HashiCorp Consul - A service mesh solution"
Documentation=https://www.consul.io/
Requires=network-online.target
After=network-online.target
# ConditionFileNotEmpty=/etc/consul.d/consul.hcl

[Service]
Type=simple
User=consul
Group=consul
LimitNOFILE=1024
WorkingDirectory=/etc/consul.d/
ExecStart=/usr/bin/consul agent -client 0.0.0.0 -config-dir=/etc/consul.d/services/ -enable-script-checks=true -config-file=/etc/consul.d/server/config.json
ExecReload=/bin/kill --signal HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=5
KillSignal=SIGINT

[Install]
WantedBy=multi-user.target

I am using Ubuntu 22.04 LTS, Consul Version is 1.13.3

this is the log result from journalctl -u consul.log

https://pastebin.com/aZNk68fP

2 Replies

Hi there,

I'm personally unfamiliar with Hashicorp Consul, but I wanted to share that Linode's Cloud Manager performance graphs are measured on a per core basis. If you're viewing the 100% through Cloud Manager, this means your system is using 1 vCPU core in total. Theoretically, if you have a Dedicated Linode 4GB with 2 vCPU cores, your system can go to 200% utilization in Cloud Manager. For a Dedicated Linode 8GB, the max would be 400% and so on.

According to Hashicorp, Consul supports multiple cores by default. If you're on the 1GB Nanode compute plan, I recommend resizing up to a plan with at least two vCPU cores (Shared Linode 4GB or Dedicated Linode 4GB).

Hopefully that can alleviate any concerns regarding the 100% utilization.

Cheers,
Eric

I doubt, I get email from linode that my linode instance is utilizing 100% cpu..

https://i.ibb.co/vJnrW69/consul-proceses.png

The part I don't get is why multiple processes shoots up ..

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct