Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(hogli): clean up zombie processes before hogli start (#63437)

Georges-Antoine Assi6b134414f057
diff --git a/bin/start b/bin/start
index 7f8e1aee230f..f15208877d7e 100755
--- a/bin/start
+++ b/bin/start
@@ -128,6 +128,14 @@ export FLAGS_READ_STORE_DATABASE_URL=${FLAGS_READ_STORE_DATABASE_URL:-postgres:/
export CYCLOTRON_DATABASE_URL=${CYCLOTRON_DATABASE_URL:-postgres://posthog:posthog@${PGHOST:-db}:${PGPORT:-5432}/cyclotron}
export CYCLOTRON_NODE_DATABASE_URL=${CYCLOTRON_NODE_DATABASE_URL:-postgres://posthog:posthog@${PGHOST:-db}:${PGPORT:-5432}/cyclotron_node}
+# Clean up orphaned dev processes left behind by a previous unclean shutdown.
+# These "zombies" hold ports and memory and cause most local dev issues. Only
+# orphans are killed — processes under an active process manager are left alone.
+# Set HOGLI_SKIP_ZOMBIE_CHECK=1 to skip. Never let it fail the script (set -e).
+if [[ -z "${HOGLI_SKIP_ZOMBIE_CHECK:-}" ]] && command -v hogli &>/dev/null; then
+ hogli doctor:zombies --yes || true
+fi
+
# Geo files
./bin/download-mmdb