You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example demonstrates how to use the supervisor to detect memory leaks and respond to them.
4
+
5
+
## `falcon.rb` Configuration
6
+
7
+
The `falcon.rb` configuration file is used to configure the Falcon web server, along with the supervisor. We have a custom `MemoryMonitor` so we can override some of the behaviour when a memory leak is detected.
8
+
9
+
## Usage
10
+
11
+
First, start the Falcon web server with the supervisor:
12
+
13
+
```bash
14
+
$ bundle exec falcon host falcon.rb
15
+
```
16
+
17
+
Then, cause a server instance to leak memory:
18
+
19
+
```bash
20
+
$ bake leak
21
+
```
22
+
23
+
The supervisor will detect the memory leak and restart the server instance:
0 commit comments