# 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 1. **Always set generously** — user explicitly wants 1.5-2x theoretical time minimum 2. **MiMo API is slow** for long prompts — 18 items with 600s timeout works; 30+ items times out even at 600s 3. **Config file is protected** — use `sed -i` via terminal, not `patch` tool 4. **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 1. Check `run_meta.json` → `llm_error` field 2. If `TimeoutError: The read operation timed out` → LLM API is slow 3. Check if `max_items` was increased — more items = longer LLM time 4. Consider reducing `max_items` in `_prefilter_items()` back to 18