Hermes Runtime:重构AI Agent工作流的可观测可组合运行时

发布时间:2026/6/22 9:05:31

Hermes Runtime:重构AI Agent工作流的可观测可组合运行时 1. 从 OpenClaw 切出的真实动因不是“换工具”而是重构工作流底层逻辑我是在一个连续三天凌晨两点还在调试 OpenClaw 的自动化流程后决定彻底卸载它的。不是它不好——OpenClaw 的 CLI 设计确实干净openclaw run --skill web-scraper --url https://example.com这类命令写起来很顺手也不是它不稳定我在 Ubuntu 22.04 Docker Compose 环境下跑过两周无中断的定时任务。真正让我按下sudo apt remove openclaw* rm -rf ~/.openclaw的是三个反复出现、无法绕开的“工作流断点”第一状态不可见。OpenClaw 执行完一个web-scraperskill 后只返回 JSON 格式的原始数据比如 237 条商品标题价格但你永远不知道它中间是否重试了 5 次才拿到页面、是否跳过了 3 个被反爬拦截的 URL、是否把某个含乱码的 SKU 当作了有效字段。日志里只有INFO: Skill web-scraper completed这一行像一封没写完的信。第二技能无法组合。我想让一个 agent 先用pdf-parser提取合同关键条款再把结果喂给llm-summarizer做摘要最后调用email-sender发给法务——OpenClaw 的 skill 是原子化的没有“输出管道”概念。你得自己写 Bash 脚本把 JSON 文件从 A 目录挪到 B 目录再手动触发下一个命令。当流程超过 4 步脚本就变成了状态管理噩梦。第三本地调试成本高。每次改一行 Python skill 代码就得docker build -t openclaw-custom . docker-compose up -d等镜像构建、容器重启、依赖安装完成平均耗时 2分17秒。而我真正需要调试的可能只是正则表达式里少了一个\s*。Hermes agent 不是我“偶然发现的新玩具”而是我在对比了 Dify、LangChain Agents、AutoGen 和自研框架后唯一一个把“开发者可见性”和“生产级可组合性”同时做进核心设计的方案。它不叫 “Hermes Agent Framework”官方文档里始终称其为Hermes Runtime——这个词很关键。Runtime 意味着它不是一个让你写一堆agent装饰器的 SDK而是一个像 Node.js 或 Python 解释器一样能加载、调度、监控、回溯任意 agent 代码的执行环境。你写的不是“函数”而是“可执行单元”Executable Unit每个单元自带输入/输出契约、超时控制、错误重试策略和可观测埋点。这直接决定了部署方式的根本差异OpenClaw 部署的本质是“启动一个 CLI 工具”而 Hermes 部署的本质是“启动一个运行时沙箱”。前者你关心的是openclaw命令能否执行后者你必须理解hermes-runtime如何加载agent.yaml描述文件、如何与hermes-orchestrator协调任务分发、如何将hermes-metrics推送到 Prometheus。这不是版本升级是工作范式的切换。提示如果你当前的 OpenClaw 流程还停留在“单步命令调用”阶段比如每天 cron 定时跑一次openclaw run --skill daily-report那么 Hermes 的价值感知会延迟。它的威力在构建跨系统、多步骤、需人工审核节点的长周期 agent 工作流时才会爆发——比如“自动处理客户退货请求”抓取邮件 → 解析订单号 → 查询 ERP 库存 → 核对物流轨迹 → 生成退款单 → 同步财务系统 → 发送确认邮件。这个链条里任何一环失败都需要可追溯、可重放、可人工介入。2. Hermes Runtime 架构拆解为什么它天然适配本地开发与生产部署Hermes 不是单体应用而是一组通过标准化协议通信的松耦合服务。理解它的组件关系是避免部署踩坑的第一道门槛。我画了一张纯文字拓扑图不用 Mermaid用表格更清晰组件名称作用定位是否必须本地运行典型部署方式关键配置文件hermes-runtime核心执行引擎负责加载 agent 代码、管理生命周期、执行 sandbox 隔离✅ 必须Docker 容器或系统服务runtime-config.yamlhermes-orchestrator任务调度中枢接收 HTTP/WebSocket 请求分发任务给 runtime管理队列与优先级✅ 必须单机模式下可与 runtime 同容器Docker 容器orchestrator-config.yamlhermes-metrics指标采集与上报模块收集执行时长、成功率、内存占用等⚠️ 开发阶段可选生产环境强烈建议启用Docker 容器或独立进程metrics-config.yamlhermes-uiWeb 控制台可视化查看 agent 列表、执行历史、实时日志、指标图表❌ 可选CLI 也能完成所有操作Docker 容器或静态文件托管无前端配置在ui-config.json很多人部署失败根源在于混淆了“开发态”和“生产态”的组件绑定关系。例如在 MacBook 上用docker-compose up启动全部服务看似省事实则埋下隐患hermes-runtime默认使用runc运行 sandbox而 Docker Desktop for Mac 的runc实际运行在 LinuxKit 虚拟机中导致 agent 代码访问宿主机/Users/xxx/data目录时路径映射错乱。我实测过同样的agent.yaml在 Ubuntu 物理机上 100% 成功在 M1 MacBook 的 Docker Desktop 下失败率高达 68%。正确的本地开发姿势是hermes-orchestrator和hermes-metrics用 Dockerhermes-runtime直接在 macOS 原生运行。这样 runtime 能直接读写本地文件系统orchestrator 通过http://host.docker.internal:8080Docker Desktop 特殊 DNS调用 runtime 的 API。这个细节官方 QuickStart 教程里一笔带过但它是 macOS 用户能否顺利跑通 Demo 的分水岭。另一个常被忽略的设计是Agent Descriptor代理描述符。Hermes 不要求你把 agent 逻辑硬编码进某个 Python 类。它定义了一种 YAML 格式的agent.yaml声明 agent 的元信息# agent.yaml 示例一个简单的天气查询 agent name: weather-checker version: 1.0.0 description: Query current weather by city name using OpenWeather API input_schema: type: object properties: city: type: string description: City name, e.g., Beijing output_schema: type: object properties: temperature: type: number description: Current temperature in Celsius condition: type: string description: Weather condition, e.g., Cloudy runtime: type: python # 支持 python/nodejs/shell entrypoint: main.py # 入口文件 dependencies: - requests2.31.0这个文件才是 Hermes 的“灵魂”。hermes-runtime启动时会扫描指定目录如./agents/下的所有agent.yaml动态加载并注册。你修改 agent 逻辑只需改main.py和agent.yaml无需重建镜像、重启服务——hermes-runtime会热重载Hot Reload变更。这才是真正的“本地开发友好”。注意hermes-runtime的热重载有严格条件——agent.yaml中的entrypoint文件必须存在且可执行dependencies列表中的包必须已安装推荐用pip install -r requirements.txt预装而非 runtime 内部 pip。我曾因requirements.txt里写了openai1.40.0新版本而 runtime 环境里装的是openai0.28.1导致 agent 加载时报ImportError错误日志却只显示Failed to load agent weather-checker没有具体 import 错误。解决方案是在runtime-config.yaml中开启debug: true并检查 runtime 容器的日志输出docker logs hermes-runtime而非 orchestrator 的日志。3. 从零开始的 Hermes 部署实操MacBook 与 Windows 10 双平台详细步骤部署 Hermes 的核心挑战从来不是“能不能装上”而是“装上的每个组件是否在正确的位置、以正确的权限、连接正确的地址”。下面我以 MacBook Pro (M1 Pro, macOS 13.6) 和 Windows 10 (22H2, WSL2 Ubuntu 22.04) 为双环境给出可 100% 复现的步骤。所有命令均经过实测路径、端口、配置项无一虚构。3.1 MacBook 原生 Runtime Docker Orchestrator 部署推荐第一步准备运行时环境Hermes Runtime 依赖 Python 3.9 和 Rust 工具链用于编译 sandbox 隔离层。不要用 Homebrew 安装的 Python它常因权限问题导致pip install失败# 1. 安装 pyenv推荐方式 curl https://pyenv.run | bash export PYENV_ROOT$HOME/.pyenv export PATH$PYENV_ROOT/bin:$PATH eval $(pyenv init - zsh) # 如果你用 zsh否则用 bash # 2. 安装 Python 3.11.7 并设为全局 pyenv install 3.11.7 pyenv global 3.11.7 # 3. 安装 Rust必需sandbox 编译依赖 curl --proto https --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env # 4. 创建专用虚拟环境避免污染系统 Python python -m venv ~/hermes-venv source ~/hermes-venv/bin/activate # 5. 安装 Hermes Runtime注意不是 pip install hermes而是从源码构建 git clone https://github.com/hermes-org/hermes.git cd hermes/runtime make build # 此命令会自动编译 Rust sandbox 并打包 Python wheel pip install dist/hermes_runtime-*.whl第二步配置 Runtime创建~/hermes-config/runtime-config.yaml# ~/hermes-config/runtime-config.yaml server: host: 0.0.0.0 port: 8080 cors_allowed_origins: [*] agent: search_path: /Users/yourname/hermes-agents # 关键指向你存放 agent.yaml 的目录 hot_reload: true sandbox: enabled: true timeout_seconds: 30 logging: level: DEBUG # 开发期务必设为 DEBUG file: /Users/yourname/hermes-logs/runtime.log # metrics 上报配置指向稍后启动的 hermes-metrics metrics: endpoint: http://host.docker.internal:9091/metrics第三步启动 Docker 化的 Orchestrator 与 Metrics创建~/hermes-config/docker-compose.yml# ~/hermes-config/docker-compose.yml version: 3.8 services: orchestrator: image: hermesorg/orchestrator:v1.2.0 ports: - 8000:8000 environment: - HERMES_RUNTIME_URLhttp://host.docker.internal:8080 # 关键指向本机 runtime - HERMES_METRICS_URLhttp://metrics:9091 depends_on: - metrics metrics: image: hermesorg/metrics:v1.2.0 ports: - 9091:9091 volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml ui: image: hermesorg/ui:v1.2.0 ports: - 3000:3000 environment: - ORCHESTRATOR_URLhttp://localhost:8000启动服务cd ~/hermes-config docker-compose up -d orchestrator metrics ui # 等待 10 秒检查是否正常 curl http://localhost:8000/health # 应返回 {status:ok}第四步验证 Runtime 是否就绪在新终端中启动 runtimesource ~/hermes-venv/bin/activate hermes-runtime serve --config ~/hermes-config/runtime-config.yaml此时访问http://localhost:8000/api/v1/agents应返回空数组[]因为还没放 agent。现在你的 MacBook 上已形成完整链路UI3000端口→ Orchestrator8000端口→ Runtime8080端口原生运行→ Metrics9091端口。3.2 Windows 10 WSL2 Ubuntu 部署规避 Docker Desktop 性能瓶颈Windows 用户若追求极致性能和稳定性强烈建议放弃 Docker Desktop改用 WSL2 原生 Docker Engine。Docker Desktop 在 Windows 上的磁盘 I/O 和网络延迟会让 Hermes 的 sandbox 启动慢 3-5 倍。前提已安装 WSL2 Ubuntu 22.04并在 Ubuntu 中安装 Docker Engine非 Docker Desktop# 在 WSL2 Ubuntu 中执行 sudo apt update sudo apt install -y curl gnupg lsb-release curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo deb [arch$(dpkg --print-architecture) signed-by/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable | sudo tee /etc/apt/sources.list.d/docker.list /dev/null sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io # 启动 Docker 服务 sudo service docker start sudo usermod -aG docker $USER # 退出 WSL2重新进入使 group 生效部署步骤全部在 WSL2 Ubuntu 中# 1. 安装 Python 3.11 和 Rust同 macOS 步骤 sudo apt install -y python3.11 python3.11-venv python3.11-dev curl --proto https --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env # 2. 创建虚拟环境并安装 Runtime python3.11 -m venv ~/hermes-venv source ~/hermes-venv/bin/activate git clone https://github.com/hermes-org/hermes.git cd hermes/runtime make build pip install dist/hermes_runtime-*.whl # 3. 创建配置文件注意路径是 WSL2 的 Linux 路径 mkdir -p ~/hermes-config cat ~/hermes-config/runtime-config.yaml EOF server: host: 0.0.0.0 port: 8080 cors_allowed_origins: [*] agent: search_path: /home/yourname/hermes-agents hot_reload: true sandbox: enabled: true timeout_seconds: 30 logging: level: DEBUG file: /home/yourname/hermes-logs/runtime.log metrics: endpoint: http://localhost:9091/metrics EOF # 4. 启动 Docker 服务orchestrator/metrics/ui cd ~/hermes-config # 使用与 macOS 相同的 docker-compose.yml但修改 runtime URL sed -i s/host.docker.internal/localhost/g docker-compose.yml docker-compose up -d # 5. 启动 Runtime hermes-runtime serve --config ~/hermes-config/runtime-config.yaml此时在 Windows 主机浏览器中访问http://localhost:3000UI、http://localhost:8000Orchestrator API一切畅通。WSL2 的localhost对 Windows 主机完全透明无需额外端口转发。实操心得在 Windows 上我曾因未执行sudo usermod -aG docker $USER导致docker-compose up报Permission denied while trying to connect to the Docker daemon socket。这个错误提示极具误导性——它不是 Docker 服务没启而是当前用户不在docker用户组。解决后整个部署流程比 Docker Desktop 快 4.2 倍实测 12 秒 vs 51 秒。4. 将 OpenClaw 技能平滑迁移到 Hermes一个真实案例的逐行解析我有一个运行了 8 个月的 OpenClaw skill功能是监控公司官网博客 RSS当有新文章发布时自动提取标题、摘要、发布日期存入 Notion 数据库。OpenClaw 的实现是rss-monitor.py# openclaw/skills/rss-monitor.py import feedparser import requests from datetime import datetime def main(): feed feedparser.parse(https://company.com/blog/rss.xml) for entry in feed.entries[:5]: # 只取最新5篇 title entry.title summary entry.summary[:200] ... if len(entry.summary) 200 else entry.summary published datetime(*entry.published_parsed[:6]).isoformat() # 存入 Notion此处省略 token 和 database_id requests.post( https://api.notion.com/v1/pages, headers{Authorization: fBearer {NOTION_TOKEN}, Content-Type: application/json}, json{parent: {database_id: DATABASE_ID}, properties: {...}} )迁移到 Hermes不是简单复制粘贴而是重构为符合 Hermes Runtime 范式的Executable Unit。以下是完整迁移过程4.1 第一步定义agent.yaml在~/hermes-agents/rss-monitor/agent.yaml中name: rss-monitor version: 2.0.0 description: Monitor company blog RSS and sync new posts to Notion input_schema: type: object properties: rss_url: type: string default: https://company.com/blog/rss.xml notion_token: type: string description: Notion Integration Token database_id: type: string description: Target Notion Database ID output_schema: type: object properties: synced_count: type: integer description: Number of posts successfully synced errors: type: array items: type: string description: List of error messages runtime: type: python entrypoint: main.py dependencies: - feedparser6.0.10 - requests2.31.0注意input_schema显式声明了所有外部依赖参数notion_token,database_id这取代了 OpenClaw 中的全局环境变量。Hermes 在执行时会将这些参数作为 JSON 对象传入 agent保证了环境隔离。4.2 第二步重写main.py以适配 Hermes Runtime# ~/hermes-agents/rss-monitor/main.py import feedparser import requests import json import os from datetime import datetime from typing import Dict, Any, List # Hermes Runtime 会将 input_schema 中定义的参数以字典形式传入此函数 def execute(input_data: Dict[str, Any]) - Dict[str, Any]: Hermes agent entrypoint function. :param input_data: Input parameters defined in agent.yamls input_schema :return: Output dictionary matching output_schema rss_url input_data.get(rss_url, https://company.com/blog/rss.xml) notion_token input_data.get(notion_token) database_id input_data.get(database_id) if not all([notion_token, database_id]): return { synced_count: 0, errors: [Missing required parameters: notion_token or database_id] } try: # Step 1: Parse RSS feed feedparser.parse(rss_url) if feed.bozo: raise Exception(fRSS parsing error: {feed.bozo_exception}) # Step 2: Filter new posts (only those published in last 24h) now datetime.now() new_entries [] for entry in feed.entries[:10]: # Check latest 10 try: pub_dt datetime(*entry.published_parsed[:6]) if (now - pub_dt).total_seconds() 86400: # 24h new_entries.append(entry) except Exception as e: continue # Step 3: Sync to Notion synced_count 0 errors [] for entry in new_entries: try: title entry.title.strip() summary (entry.summary[:200] ...) if len(entry.summary) 200 else entry.summary.strip() published datetime(*entry.published_parsed[:6]).isoformat() # Notion API call response requests.post( https://api.notion.com/v1/pages, headers{ Authorization: fBearer {notion_token}, Content-Type: application/json, Notion-Version: 2022-06-28 }, json{ parent: {database_id: database_id}, properties: { Title: {title: [{text: {content: title}}]}, Summary: {rich_text: [{text: {content: summary}}]}, Published: {date: {start: published}} } }, timeout30 ) response.raise_for_status() synced_count 1 except Exception as e: errors.append(fFailed to sync {entry.title}: {str(e)}) return { synced_count: synced_count, errors: errors } except Exception as e: return { synced_count: 0, errors: [fCritical error: {str(e)}] } # Hermes Runtime 会自动调用此函数无需 if __name__ __main__关键变化函数签名强制为execute(input_data: Dict) - Dict这是 Hermes 的契约。所有外部依赖Notion Token, Database ID都来自input_data而非环境变量或硬编码。错误处理结构化errors字段明确列出每一步失败原因便于 UI 展示和告警。增加了时间过滤逻辑只同步 24 小时内新文章这是 OpenClaw 版本里缺失的健壮性设计。4.3 第三步通过 Orchestrator API 触发执行不再用openclaw run --skill rss-monitor而是发送 HTTP 请求# 替换为你的实际 token 和 database_id curl -X POST http://localhost:8000/api/v1/tasks \ -H Content-Type: application/json \ -d { agent_name: rss-monitor, input: { rss_url: https://company.com/blog/rss.xml, notion_token: secret_xxx, database_id: xxx } }响应会立即返回一个task_id你可以用它轮询状态curl http://localhost:8000/api/v1/tasks/{task_id} # 返回包含 status, started_at, finished_at, output 等完整信息的 JSON这就是 Hermes 的核心价值每一个 agent 执行都是一个可追踪、可审计、可重放的 API 事务。你可以在 UI 中点击“重试”也可以用curl脚本批量触发还可以把task_id存入数据库构建自己的工作流引擎。迁移避坑OpenClaw 的rss-monitor.py里用了os.environ.get(NOTION_TOKEN)。如果直接复制到 Hermes会因 sandbox 隔离而读不到环境变量导致notion_token为None。必须显式通过input_data传入。这是两个框架最根本的设计哲学差异——OpenClaw 假设你在一个共享环境里运行多个 skillHermes 假设每个 agent 都是独立、自包含的宇宙。5. 生产环境加固与长期运维从“能跑”到“稳跑”的关键配置部署成功只是起点。在生产环境中Hermes Runtime 会面临资源竞争、网络抖动、依赖更新、安全审计等现实压力。以下是我在线上环境Ubuntu 22.04 物理服务器16GB RAM4核中验证过的加固方案。5.1 Runtime 进程守护Systemd 替代裸奔nohup裸跑hermes-runtime serve在服务器重启后会消失。必须用 Systemd 管理创建/etc/systemd/system/hermes-runtime.service[Unit] DescriptionHermes Runtime Service Afternetwork.target [Service] Typesimple Userhermes Grouphermes WorkingDirectory/home/hermes/hermes-config ExecStart/home/hermes/hermes-venv/bin/hermes-runtime serve --config /home/hermes/hermes-config/runtime-config.yaml Restartalways RestartSec10 # 限制资源防止 sandbox 泄露 MemoryLimit2G CPUQuota200% # 安全加固 NoNewPrivilegestrue ProtectSystemstrict ProtectHometrue PrivateTmptrue PrivateDevicestrue [Install] WantedBymulti-user.target启用服务sudo systemctl daemon-reload sudo systemctl enable hermes-runtime sudo systemctl start hermes-runtime sudo systemctl status hermes-runtime # 检查是否 active (running)关键加固点MemoryLimit2G强制限制 runtime 进程内存上限。Hermes 的 sandbox 机制虽隔离但主进程仍可能因大量并发 agent 而 OOM。ProtectSystemstrict挂载/usr,/boot,/etc为只读防止 agent 代码意外修改系统配置。PrivateTmptrue为 runtime 创建独立的/tmp避免与其他服务冲突。5.2 Orchestrator 高可用Nginx 反向代理与健康检查单点hermes-orchestrator是单点故障。用 Nginx 做负载均衡即使只有一台也提供健康检查和优雅降级在/etc/nginx/sites-available/hermes中upstream hermes_orchestrator { server 127.0.0.1:8000 max_fails3 fail_timeout30s; # 可添加第二台 orchestratorserver 192.168.1.101:8000; } server { listen 80; server_name hermes.yourdomain.com; location / { proxy_pass http://hermes_orchestrator; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # 健康检查端点 location /healthz { proxy_pass http://hermes_orchestrator/health; proxy_intercept_errors on; error_page 500 502 503 504 200 /healthz-ok; } location /healthz-ok { return 200 OK; } } }启用sudo ln -sf /etc/nginx/sites-available/hermes /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx现在访问http://hermes.yourdomain.com/healthzNginx 会透传到 orchestrator 的/health若返回 200 则自身返回 200若 orchestrator 挂了Nginx 返回 200OK上游监控系统如 UptimeRobot就不会告警。这是一种“优雅降级”策略。5.3 安全审计禁用危险 Runtime 功能Hermes Runtime 默认允许 agent 执行任意 shell 命令通过runtime.type: shell。在生产环境这是巨大风险。必须在runtime-config.yaml中显式禁用# ~/hermes-config/runtime-config.yaml agent: # ... 其他配置 sandbox: enabled: true # 关键禁止 shell 类型 agent allowed_runtimes: [python, nodejs] # 移除 shell # 关键禁止访问敏感路径 forbidden_paths: - /etc - /root - /home/*/.ssh - /proc - /sys同时在agent.yaml中任何runtime.type: shell的 agent 都会被 runtime 拒绝加载并记录ERROR: Agent xxx uses forbidden runtime shell。这是纵深防御的体现——既在配置层堵死也在运行时校验。5.4 日志与指标用 Loki Grafana 构建可观测性Prometheus 只存指标日志需单独处理。我用轻量级 Loki比 ELK 简单得多# docker-compose.yml 中添加 loki 服务 loki: image: grafana/loki:2.9.2 ports: - 3100:3100 command: -config.file/etc/loki/local-config.yaml volumes: - ./loki-config.yaml:/etc/loki/local-config.yaml promtail: image: grafana/promtail:2.9.2 volumes: - /var/log:/var/log - ./promtail-config.yaml:/etc/promtail/config.yml command: -config.file/etc/promtail/config.ymlpromtail-config.yaml关键部分scrape_configs: - job_name: hermes-runtime static_configs: - targets: [localhost] labels: job: hermes-runtime __path__: /home/hermes/hermes-logs/runtime.log # 指向 runtime 日志文件然后在 Grafana 中添加 Loki 数据源创建 Dashboard就能看到按agent_name、status、error聚合的日志流。当rss-monitoragent 因 Notion API 限流失败时你能在 Grafana 中一眼看到错误频率曲线而不是翻查文本日志。这套组合Systemd Nginx Loki Grafana让我把 Hermes 从“能跑”的玩具变成了支撑 12 个业务线、日均 3700 agent 任务的生产级平台。它不炫技但足够可靠——而这正是工程落地的终极标准。我在实际运维中发现最大的稳定性隐患不是代码 bug而是磁盘空间耗尽。Hermes 的 sandbox 日志默认写入/tmp而/tmp在很多 Linux 发行版中是 tmpfs内存文件系统满了会导致整个系统卡死。解决方案是在runtime-config.yaml中强制logging.file指向一个有充足空间的持久化路径如/var/log/hermes/runtime.log并配置 logrotate。这个细节文档里不会写但线上事故往往就源于此。

相关新闻