1.9 KiB
1.9 KiB
arXiv Operations Runbook
Use this runbook when arXiv lookups are slow, rate-limited, or behaving unexpectedly.
Signals To Check
- logs for
arxiv.request_scheduled,arxiv.request_completed,arxiv.cooldown_activated,arxiv.cache_hit,arxiv.cache_miss arxiv_runtime_staterow for cooldown and next-allowed timestampsarxiv_query_cache_entriessize and expiry churn
Event Field Guide
wait_seconds: enforced pre-request delay from the global limiter.status_code: upstream response code from arXiv.cooldown_remaining_seconds: remaining cooldown when blocked or after 429.source_path: caller path (searchorlookup_ids).
Quick SQL Checks
SELECT state_key, next_allowed_at, cooldown_until, updated_at
FROM arxiv_runtime_state;
SELECT count(*) AS cache_rows, min(expires_at) AS earliest_expiry, max(expires_at) AS latest_expiry
FROM arxiv_query_cache_entries;
Common Scenarios
- Repeated
arxiv.cooldown_activatedevents:
- Confirm recent
429statuses inarxiv.request_completed. - Reduce caller pressure (check new title-quality/identifier guards are active).
- Temporarily raise
ARXIV_RATE_LIMIT_COOLDOWN_SECONDSif upstream remains strict.
- High request latency with few completions:
- Inspect
wait_secondsinarxiv.request_scheduled. - Verify only one process path is repeatedly hitting arXiv (
source_path). - Confirm cache is enabled (
ARXIV_CACHE_TTL_SECONDS > 0) and effective (cache_hitappears).
- Low cache effectiveness:
- Validate normalized query behavior and caller churn.
- Increase
ARXIV_CACHE_TTL_SECONDSfor stable workloads. - Increase
ARXIV_CACHE_MAX_ENTRIESif heavy eviction is observed.
Safe Recovery
- Pause automated ingestion if rate-limit storms persist.
- Let cooldown expire naturally; avoid manual burst retries.
- Resume and monitor event rates before restoring full load.