fix: pprof port conflict crashed Go server — non-fatal bind + separate ports

Server defaults to 6060, ingestor to 6061. Removed shared PPROF_PORT
env var. Bind failure logs warning instead of log.Fatal killing the process.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Kpa-clawbot
2026-03-28 13:01:41 -07:00
co-authored by Copilot
parent aba4270ceb
commit b326e3f1a6
3 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -30,7 +30,9 @@ func main() {
}
go func() {
log.Printf("[pprof] ingestor profiling at http://localhost:%s/debug/pprof/", pprofPort)
log.Fatal(http.ListenAndServe(":"+pprofPort, nil))
if err := http.ListenAndServe(":"+pprofPort, nil); err != nil {
log.Printf("[pprof] failed to start: %v (non-fatal)", err)
}
}()
}
+3 -1
View File
@@ -63,7 +63,9 @@ func main() {
}
go func() {
log.Printf("[pprof] profiling UI at http://localhost:%s/debug/pprof/", pprofPort)
log.Fatal(http.ListenAndServe(":"+pprofPort, nil))
if err := http.ListenAndServe(":"+pprofPort, nil); err != nil {
log.Printf("[pprof] failed to start: %v (non-fatal)", err)
}
}()
}
-1
View File
@@ -67,7 +67,6 @@ services:
environment:
- NODE_ENV=staging
- ENABLE_PPROF=true
- PPROF_PORT=6060
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/stats"]
interval: 30s