Skip to content

fix: Rate limiter too aggressive for BookDB API tiers #252

Description

@deucebucket

Problem

Library Manager paces BookDB requests at 3.6s delay (1000/hr max), but BookDB's actual rate limits are much lower:

Tier BookDB Limit LM Sends
Signed LM, no API key (Tier 2) 500/day (~21/hr) 1000/hr
Known LM, no signature (Tier 3) 200/hr 1000/hr
With API key (Tier 1) 300/hr 1000/hr

LM can exceed BookDB's limits by 3-48x depending on the tier, causing 429 responses despite careful pacing.

Fix

Update library_manager/providers/rate_limiter.py — increase min_delay for bookdb from 3.6 to 12.0 (300/hr, matching the most common API key tier). Also add adaptive backoff that reads the actual tier from 429 response headers if available.

Files

  • library_manager/providers/rate_limiter.py — change min_delay
  • library_manager/providers/bookdb.py — improve 429 handling to extract retry-after header

Cross-reference

BookDB side should also raise tier limits for signed LM clients — that's a separate Skaldleita issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingintegrationCross-system integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions