Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Set priority of consul agent to 'High'
Browse files Browse the repository at this point in the history
If the CPU is under load (99-100%) DNS lookups for internal CF
components (through consul) will time out. By raising the priority of the
consul process, we can ensure that it is never starved of CPU,
preventing the timeouts

[#154809327]

Signed-off-by: Andrew Keesler <akeesler@pivotal.io>
  • Loading branch information
sesmith177 authored and Andrew Keesler committed Feb 13, 2018
1 parent 60a8ea4 commit 73538f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions jobs/consul_agent_windows/spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ templates:
confab.json.erb: confab.json
consul_link.json.erb: consul_link.json
pre-start.ps1.erb: bin/pre-start.ps1
post-start.ps1.erb: bin/post-start.ps1

packages:
- consul-windows
Expand Down
6 changes: 6 additions & 0 deletions jobs/consul_agent_windows/templates/post-start.ps1.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$ErrorActionPreference = "Stop";
trap {
$host.SetShouldExit(1)
}

(Get-Process -Name consul).PriorityClass='High'

0 comments on commit 73538f7

Please sign in to comment.