From b64e4063936fde7864dac17c0f81fcae17eaa6c6 Mon Sep 17 00:00:00 2001 From: kth13 Date: Tue, 14 Nov 2023 12:46:21 +0000 Subject: [PATCH] run book commands for overcome DB CPU max utilization --- .idea/.gitignore | 3 ++ .idea/codeStyles/Project.xml | 13 +++++++ .idea/codeStyles/codeStyleConfig.xml | 5 +++ .idea/misc.xml | 9 +++++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ hmpps-interventions-docs.iml | 9 +++++ source/runbooks/runbook-commands.html.md.erb | 36 ++++++++++++++++++++ 8 files changed, 89 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 hmpps-interventions-docs.iml create mode 100644 source/runbooks/runbook-commands.html.md.erb diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..f5cb871 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,13 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d79bd4e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..aa32c81 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hmpps-interventions-docs.iml b/hmpps-interventions-docs.iml new file mode 100644 index 0000000..8021953 --- /dev/null +++ b/hmpps-interventions-docs.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/source/runbooks/runbook-commands.html.md.erb b/source/runbooks/runbook-commands.html.md.erb new file mode 100644 index 0000000..c6f07a3 --- /dev/null +++ b/source/runbooks/runbook-commands.html.md.erb @@ -0,0 +1,36 @@ +--- +title: Production support commands +weight: 54 +last_reviewed_on: 2023-11-14 +review_in: 1 year +--- + +# When the DB cpu is 100 %, try restarting the pods first + +## commands restarting the pods, do it one by one + +``` +kubectl rollout restart deployment hmpps-interventions-service-dashboard -n hmpps-interventions-prod +kubectl rollout restart deployment hmpps-interventions-service-api -n hmpps-interventions-prod +kubectl rollout restart deployment hmpps-interventions-ui -n hmpps-interventions-prod +kubectl rollout restart deployment hmpps-interventions-service-performance-report -n hmpps-interventions-prod +``` + +## If the above commands does not bring the db cpu down, trying scaling down and scale support up + +### commands for scaling down + +``` +kubectl scale deployment hmpps-interventions-service-api -n hmpps-interventions-prod --replicas=0 +kubectl scale deployment hmpps-interventions-service-dashboard -n hmpps-interventions-prod --replicas=0 +kubectl scale deployment hmpps-interventions-service-performance-report -n hmpps-interventions-prod --replicas=0 +kubectl scale deployment hmpps-interventions-ui -n hmpps-interventions-prod --replicas=0 +``` +### commands for scaling up + +``` +kubectl scale deployment hmpps-interventions-service-api -n hmpps-interventions-prod --replicas=3 +kubectl scale deployment hmpps-interventions-service-dashboard -n hmpps-interventions-prod --replicas=2 +kubectl scale deployment hmpps-interventions-service-performance-report -n hmpps-interventions-prod --replicas=1 +kubectl scale deployment hmpps-interventions-ui -n hmpps-interventions-prod --replicas=3 +```