forked from F1bonacc1/process-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue F1bonacc1#107 - Fix goroutine leak when readiness probe on
- Loading branch information
Showing
6 changed files
with
166 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
> go tool pprof -alloc_space heap.out | ||
File: process-compose | ||
Type: alloc_space | ||
Time: Dec 2, 2023 at 2:32am (IST) | ||
Duration: 30.01s, Total samples = 206.33MB | ||
Entering interactive mode (type "help" for commands, "o" for options) | ||
(pprof) top | ||
Showing nodes accounting for 199.44MB, 96.66% of 206.33MB total | ||
Dropped 72 nodes (cum <= 1.03MB) | ||
Showing top 10 nodes out of 26 | ||
flat flat% sum% cum cum% | ||
187.04MB 90.65% 90.65% 187.04MB 90.65% github.com/rivo/tview.(*TextView).parseAhead | ||
5.90MB 2.86% 93.51% 5.90MB 2.86% strings.(*Builder).WriteString (inline) | ||
3MB 1.45% 94.97% 3.50MB 1.70% github.com/rivo/tview.step | ||
3MB 1.45% 96.42% 196.44MB 95.21% github.com/rivo/tview.(*TextView).Draw | ||
0.50MB 0.24% 96.66% 3.50MB 1.70% github.com/rivo/tview.(*Table).Draw | ||
0 0% 96.66% 2MB 0.97% github.com/InVisionApp/go-health/v2.(*Health).startRunner.func1 | ||
0 0% 96.66% 2MB 0.97% github.com/InVisionApp/go-health/v2.(*Health).startRunner.func2 | ||
0 0% 96.66% 200.44MB 97.15% github.com/f1bonacc1/process-compose/src/cmd.startTui | ||
0 0% 96.66% 140.93MB 68.30% github.com/f1bonacc1/process-compose/src/tui.(*pcView).updateLogs.(*Application).QueueUpdateDraw.func4 | ||
0 0% 96.66% 59.51MB 28.84% github.com/f1bonacc1/process-compose/src/tui.(*pcView).updateTable.(*Application).QueueUpdateDraw.func4 | ||
(pprof) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
> go tool pprof heap.out | ||
File: process-compose | ||
Type: inuse_space | ||
Time: Dec 2, 2023 at 2:32am (IST) | ||
Duration: 30.01s, Total samples = 1.52MB | ||
Entering interactive mode (type "help" for commands, "o" for options) | ||
(pprof) top | ||
Showing nodes accounting for -528.06kB, 34.02% of 1552.40kB total | ||
Showing top 10 nodes out of 30 | ||
flat flat% sum% cum cum% | ||
-528.17kB 34.02% 34.02% -528.17kB 34.02% regexp.(*bitState).reset | ||
512.17kB 32.99% 1.03% 512.17kB 32.99% internal/profile.(*Profile).postDecode | ||
-512.06kB 32.99% 34.02% -512.06kB 32.99% github.com/rivo/tview.(*TextView).parseAhead | ||
0 0% 34.02% -528.17kB 34.02% github.com/f1bonacc1/process-compose/src/app.(*Process).handleInfo | ||
0 0% 34.02% -528.17kB 34.02% github.com/f1bonacc1/process-compose/src/app.(*Process).handleOutput | ||
0 0% 34.02% -512.06kB 32.99% github.com/f1bonacc1/process-compose/src/cmd.startTui | ||
0 0% 34.02% -528.17kB 34.02% github.com/f1bonacc1/process-compose/src/pclog.(*ProcessLogBuffer).Write | ||
0 0% 34.02% -528.17kB 34.02% github.com/f1bonacc1/process-compose/src/tui.(*LogView).WriteString | ||
0 0% 34.02% -512.06kB 32.99% github.com/f1bonacc1/process-compose/src/tui.(*pcView).updateLogs.(*Application).QueueUpdateDraw.func4 | ||
0 0% 34.02% -512.06kB 32.99% github.com/f1bonacc1/process-compose/src/tui.SetupTui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
version: "0.5" | ||
|
||
log_level: debug | ||
log_length: 1000 | ||
|
||
processes: | ||
redis: | ||
command: "sleep 999999999" | ||
readiness_probe: | ||
exec: | ||
command: "pidof process-compose" | ||
initial_delay_seconds: 1 | ||
period_seconds: 1 | ||
timeout_seconds: 1 | ||
success_threshold: 1 | ||
failure_threshold: 20 | ||
|
||
webserver-a: | ||
command: "sleep 999999999" | ||
readiness_probe: | ||
http_get: | ||
host: localhost | ||
scheme: http | ||
path: "/live" | ||
port: 8080 | ||
initial_delay_seconds: 1 | ||
period_seconds: 1 | ||
timeout_seconds: 1 | ||
success_threshold: 1 | ||
failure_threshold: 20 | ||
depends_on: | ||
redis: | ||
condition: process_healthy | ||
|
||
webserver-b: | ||
command: "sleep 999999999" | ||
readiness_probe: | ||
http_get: | ||
host: localhost | ||
scheme: http | ||
path: "/live" | ||
port: 8080 | ||
initial_delay_seconds: 1 | ||
period_seconds: 1 | ||
timeout_seconds: 1 | ||
success_threshold: 1 | ||
failure_threshold: 20 | ||
depends_on: | ||
redis: | ||
condition: process_started | ||
shutdown: | ||
parent_only: true | ||
|
||
rpyc-client: | ||
command: "sleep 999999999" | ||
depends_on: | ||
webserver-b: | ||
condition: process_healthy | ||
shutdown: | ||
signal: 1 # SIGHUP | ||
timeout_seconds: 5 | ||
availability: | ||
restart: on_failure | ||
backoff_seconds: 10 | ||
max_restarts: 3 | ||
|
||
webserver-c: | ||
command: "sleep 999999999" | ||
readiness_probe: | ||
http_get: | ||
host: localhost | ||
scheme: http | ||
path: "/live" | ||
port: 8080 | ||
initial_delay_seconds: 20 | ||
period_seconds: 30 | ||
timeout_seconds: 10 | ||
success_threshold: 1 | ||
failure_threshold: 4 | ||
depends_on: | ||
webserver-b: | ||
condition: process_healthy | ||
availability: | ||
restart: on_failure | ||
backoff_seconds: 10 | ||
max_restarts: 3 | ||
|
||
httpclient: | ||
command: "sleep 999999999" | ||
depends_on: | ||
webserver-b: | ||
condition: process_healthy | ||
|
||
pc_log: | ||
command: "tail -f -n100 process-compose-${USER}.log" | ||
working_dir: "/tmp" | ||
namespace: debug | ||
|
||
memory: | ||
command: "./bin/process-compose project state --with-memory" | ||
availability: | ||
restart: always | ||
backoff_seconds: 60 | ||
namespace: debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters