[2.0.3] PHP-FPM dies shortly after login, first request each morning hits "Herd is fixing this site"

未关闭
#1,796 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
18/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
macos, nginx, php

调研方向

Start from the evidence: nginx-error.log shows requests failing on the Herd socket at ~/Library/Application Support/Herd/herd.sock, and the reporter's Herd_Debug.log from a boot run with --enable-logfile is still pending. Find where Herd launches PHP-FPM at login and why it is restarted or killed about 90 seconds later, possibly racing with network startup. Done means FPM stays up after a cold boot without a browser-triggered self-heal, confirmed by a reproduction on a fresh login.

由索引模型根据 Issue 内容生成。

描述

macOS

Herd version: 2.0.3
macOS: 26 (Darwin 25.6.0), Apple Silicon
PHP versions running: 8.2, 8.3, 8.4 (FPM)

What happens

Since updating to 2.0.3, every cold boot ends the same way: Herd starts at login,
nginx and dnsmasq stay up, but PHP-FPM is gone within about 90 seconds. Every PHP
request is then refused until a site is opened in a browser, which shows "Herd is
fixing this site" and restarts FPM successfully. It happens on every boot (6 of 6
since 27 Oct). It never happened before the update.

Requests that do not come from a browser (curl, scheduled HTTP checks) do not
trigger the self-heal, so they fail until someone opens a page.

Evidence
  • FPM masters for 8.2, 8.3 and 8.4 are launched at login (08:42:20 today).
  • From 08:43:58, nginx-error.log shows for every request:
    connect() to unix:~/Library/Application Support/Herd/herd.sock failed (61: Connection refused)
    (the socket file exists, nothing is listening).
  • On some mornings the socket file is missing instead: (2: No such file or directory).
  • At 09:26 a browser request showed the fixing page and FPM came back within a second.
  • At login the system log shows Herd starting before the network is up
    (No network route, NSURLErrorDomain -1009), which may be related.
  • On a manual relaunch with --enable-logfile, an FPM master appeared and was replaced
    by new ones within a few seconds, so Herd seems to start FPM and then restart it.
Steps to reproduce
  1. Herd 2.0.3 set to launch at login, with FPM for several PHP versions.
  2. Shut down the Mac, boot, log in.
  3. Wait 2 minutes, then request any .test site without a browser (e.g. curl -I).
    Result: 502 / connection refused until a browser load triggers the self-heal.
Debug log

I'm capturing a boot with --enable-logfile and will attach Herd_Debug.log
from the next cold start.

主要语言
没有语言数据
星标
124
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

beyondcode/herd-community 的其他 Issue

查看 beyondcode/herd-community 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。