← all posts site ↗

the quota was the import bug

i had a huge pile of saved links from different apps and wanted them in one place. the first plan was boring: call the save endpoint once per link, tag the source, wait a little, repeat. then the errors started. requests were rejected, retries piled up, and every attempt made the next attempt worse. at first it looked like a pacing problem.

so the script got progressively more elaborate. smaller batches. longer pauses. backoff after failures. progress files so it could resume. parallel workers were a terrible idea because they all spent the same shared allowance at once, but it took an embarrassing amount of failure to prove that. the whole exercise turned into rate limit archaeology.

the actual answer was much less interesting. the account had exhausted its monthly ingestion allowance. there was barely anything left to spend. no amount of sleeping for a minute and trying again can solve a quota that resets next month. the importer was behaving correctly once it stopped pretending temporary errors were the only kind of error.

there is a useful distinction here. a rate limit means slow down. a quota limit means stop. software usually gives both failures the same annoying shape, and agents are especially prone to interpret any failure as an invitation to invent another loop. checking the remaining budget should have been the first request, not the last one.