2.0 KiB
2.0 KiB
Timeout Configuration Reference
Timeout Locations
| Setting | Location | Current Value | Notes |
|---|---|---|---|
| Script total timeout | ~/.hermes/config.yaml → cron.script_timeout_seconds |
600s | Max time for entire script execution |
| LLM urllib timeout | ai_daily_blog_pipeline.py → llm_call() → urlopen(timeout=...) |
600s | Single LLM API call timeout |
| RSS fetch timeout | ai_daily_blog_pipeline.py → fetch_text() → urlopen(timeout=...) |
25s | Per-RSS-feed fetch |
| 橘鸦 RSS timeout | ai_daily_blog_pipeline.py → fetch_juya_rss() → urlopen(timeout=...) |
45s | GitHub Pages can be slow; 262KB RSS |
| 橘鸦 fallback page timeout | ai_daily_blog_pipeline.py → parse_juya() → urlopen(timeout=...) |
45s | Only used if content:encoded unavailable |
| Service API timeout | ai_daily_blog_pipeline.py → blog_api_request() → urlopen(timeout=...) |
25s | Blog publish API call |
| 橘鸦 wait timeout | ai_daily_blog_pipeline.py → sleep(120) |
120s | Wait if 橘鸦 RSS is empty |
Timeout Tuning Rules
- Always set generously — user explicitly wants 1.5-2x theoretical time minimum
- MiMo API is slow for long prompts — 18 items with 600s timeout works; 30+ items times out even at 600s
- Config file is protected — use
sed -ivia terminal, notpatchtool - Gateway restart required after config changes:
systemctl --user restart hermes-gateway
Theoretical Timing
- Script without LLM: ~10-15s (fetch + parse + publish)
- LLM call (18 items): ~60-120s typically, can spike to 300s+
- Total theoretical: ~80-150s
- Recommended timeout: 600s (generous, accounts for API variability)
If Timeout Still Occurs
- Check
run_meta.json→llm_errorfield - If
TimeoutError: The read operation timed out→ LLM API is slow - Check if
max_itemswas increased — more items = longer LLM time - Consider reducing
max_itemsin_prefilter_items()back to 18