summaryrefslogtreecommitdiff
path: root/doc/development/chaos_endpoints.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/chaos_endpoints.md')
-rw-r--r--doc/development/chaos_endpoints.md19
1 files changed, 11 insertions, 8 deletions
diff --git a/doc/development/chaos_endpoints.md b/doc/development/chaos_endpoints.md
index 56e91acbc4a..b0de00648ba 100644
--- a/doc/development/chaos_endpoints.md
+++ b/doc/development/chaos_endpoints.md
@@ -47,7 +47,7 @@ Replace `secret` with your own secret token.
After you have enabled the chaos endpoints and restarted the application, you can start testing using the endpoints.
By default, when invoking a chaos endpoint, the web worker process which receives the request handles it. This means, for example, that if the Kill
-operation is invoked, the Puma or Unicorn worker process handling the request is killed. To test these operations in Sidekiq, the `async` parameter on
+operation is invoked, the Puma worker process handling the request is killed. To test these operations in Sidekiq, the `async` parameter on
each endpoint can be set to `true`. This runs the chaos process in a Sidekiq worker.
## Memory leaks
@@ -70,7 +70,8 @@ GET /-/chaos/leakmem?memory_mb=1024&duration_s=50&async=true
| `async` | boolean | no | Set to true to leak memory in a Sidekiq background worker process |
```shell
-curl "http://localhost:3000/-/chaos/leakmem?memory_mb=1024&duration_s=10" --header 'X-Chaos-Secret: secret'
+curl "http://localhost:3000/-/chaos/leakmem?memory_mb=1024&duration_s=10" \
+ --header 'X-Chaos-Secret: secret'
curl "http://localhost:3000/-/chaos/leakmem?memory_mb=1024&duration_s=10&token=secret"
```
@@ -79,7 +80,6 @@ curl "http://localhost:3000/-/chaos/leakmem?memory_mb=1024&duration_s=10&token=s
This endpoint attempts to fully utilise a single core, at 100%, for the given period.
Depending on your rack server setup, your request may timeout after a predetermined period (normally 60 seconds).
-If you're using Unicorn, this is done by killing the worker process.
```plaintext
GET /-/chaos/cpu_spin
@@ -93,7 +93,8 @@ GET /-/chaos/cpu_spin?duration_s=50&async=true
| `async` | boolean | no | Set to true to consume CPU in a Sidekiq background worker process |
```shell
-curl "http://localhost:3000/-/chaos/cpu_spin?duration_s=60" --header 'X-Chaos-Secret: secret'
+curl "http://localhost:3000/-/chaos/cpu_spin?duration_s=60" \
+ --header 'X-Chaos-Secret: secret'
curl "http://localhost:3000/-/chaos/cpu_spin?duration_s=60&token=secret"
```
@@ -103,7 +104,6 @@ This endpoint attempts to fully utilise a single core, and interleave it with DB
This endpoint can be used to model yielding execution to another threads when running concurrently.
Depending on your rack server setup, your request may timeout after a predetermined period (normally 60 seconds).
-If you're using Unicorn, this is done by killing the worker process.
```plaintext
GET /-/chaos/db_spin
@@ -118,7 +118,8 @@ GET /-/chaos/db_spin?duration_s=50&async=true
| `async` | boolean | no | Set to true to perform the operation in a Sidekiq background worker process |
```shell
-curl "http://localhost:3000/-/chaos/db_spin?interval_s=1&duration_s=60" --header 'X-Chaos-Secret: secret'
+curl "http://localhost:3000/-/chaos/db_spin?interval_s=1&duration_s=60" \
+ --header 'X-Chaos-Secret: secret'
curl "http://localhost:3000/-/chaos/db_spin?interval_s=1&duration_s=60&token=secret"
```
@@ -140,7 +141,8 @@ GET /-/chaos/sleep?duration_s=50&async=true
| `async` | boolean | no | Set to true to sleep in a Sidekiq background worker process |
```shell
-curl "http://localhost:3000/-/chaos/sleep?duration_s=60" --header 'X-Chaos-Secret: secret'
+curl "http://localhost:3000/-/chaos/sleep?duration_s=60" \
+ --header 'X-Chaos-Secret: secret'
curl "http://localhost:3000/-/chaos/sleep?duration_s=60&token=secret"
```
@@ -200,7 +202,8 @@ POST /-/chaos/gc
Example request:
```shell
-curl --request POST "http://localhost:3000/-/chaos/gc" --header 'X-Chaos-Secret: secret'
+curl --request POST "http://localhost:3000/-/chaos/gc" \
+ --header 'X-Chaos-Secret: secret'
curl --request POST "http://localhost:3000/-/chaos/gc?token=secret"
```