fix: auto-heal ERR_CONNECTION_REFUSED on zeusai.pro#160
Merged
Conversation
…atchdog, server cron, faster deploy Agent-Logs-Url: https://github.com/ruffy80/ZeusAI/sessions/f66ac24f-d661-401f-ad82-a02b095d6f10 Co-authored-by: ruffy80 <29306714+ruffy80@users.noreply.github.com>
…ression in nginx heal Agent-Logs-Url: https://github.com/ruffy80/ZeusAI/sessions/f66ac24f-d661-401f-ad82-a02b095d6f10 Co-authored-by: ruffy80 <29306714+ruffy80@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
ruffy80
April 13, 2026 21:37
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zeusai.proreturnsERR_CONNECTION_REFUSEDwhen Nginx is down — the only recovery path was the keepalive workflow running every 30 minutes, and no mechanism watched Nginx specifically (health-guardian only probed:3000directly, bypassing Nginx entirely).Changes
health-guardian.js— Nginx watchdogcheckNginx()pollinghttp://127.0.0.1:80/every 60shealNginx()that runsnginx -t && systemctl reload nginx || systemctl restart nginx || service nginx restarton 3 consecutive failuresERR_CONNECTION_REFUSEDunicorn-keepalive.yml— frequency + server cron bootstrap*/30→*/5(max 5-min external detection window for complete server failures)/etc/cron.d/unicorn-self-healif not present — runsfix-server.shevery 5 min on the server itself, independent of GitHub CIvercel-deploy.yml— cron install on every deploy/etc/cron.d/unicorn-self-heal, ensuring the server-side healer is always currentRecovery layers after these changes
unicorn-health-guardian(PM2)/etc/cron.d/unicorn-self-healunicorn-keepalive.yml(GH Actions)