Skip to content

Commit

Permalink
run book commands for overcome DB CPU max utilization
Browse files Browse the repository at this point in the history
  • Loading branch information
kth13 committed Nov 14, 2023
1 parent 48d4a76 commit b64e406
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions hmpps-interventions-docs.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
36 changes: 36 additions & 0 deletions source/runbooks/runbook-commands.html.md.erb
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit b64e406

Please sign in to comment.