Mintplex-Labs/anything-llm · warning
[Gitlab Loader]: Rate limit hit fetching ${sourceFilePath}.
Error message
[Gitlab Loader]: Rate limit hit fetching ${sourceFilePath}. Waiting ${retryAfter}s... What it means
Transient warning from fetchSingleFileContents: GitLab answered 429 for one raw-file request. The loader reads Retry-After (default 60s), waits, and retries with an incremented retry counter; this is normal back-off, not a failure by itself.
Source
Thrown at collector/utils/extensions/RepoLoader/GitlabRepo/RepoLoader/index.js:352
const url = `${this.apiBase}/api/v4/projects/${
this.projectId
}/repository/files/${encodeURIComponent(sourceFilePath)}/raw?ref=${
this.branch
}`;
const response = await fetch(url, {
method: "GET",
headers: this.accessToken ? { "PRIVATE-TOKEN": this.accessToken } : {},
});
if (response.status === 429) {
if (retries >= MAX_RETRIES) {
console.warn(
`[Gitlab Loader]: Rate limit persists for ${sourceFilePath} after ${retries} retries. Skipping.`
);
return null;
}
const retryAfter = Number(response.headers.get("retry-after")) || 60;
console.warn(
`[Gitlab Loader]: Rate limit hit fetching ${sourceFilePath}. Waiting ${retryAfter}s...`
);
await this.#wait(retryAfter * 1000);
return this.fetchSingleFileContents(sourceFilePath, retries + 1);
}
if (!response.ok)
throw new Error(`Failed to fetch single file ${sourceFilePath}`);
return await response.text();
} catch (e) {
console.error(`RepoLoader.fetchSingleFileContents`, e);
return null;
}
}
/**
* Fetches the next page of data from the API.View on GitHub (pinned to 3aec848f28)
Solutions
- No action needed for an occasional occurrence — the built-in retry recovers.
- Frequent occurrences: reduce files per run via path filters or schedule syncs further apart.
- Move to a token/host with a higher quota if the pattern repeats.
Defensive patterns
Strategy: retry
Prevention
- Treat occasional occurrences as healthy back-off; alert only when 'persists' lines appear.
- Space out scheduled syncs so bursts do not trip per-minute quotas.
- Confirm Retry-After is honored by watching wait durations in logs.
When it happens
Trigger: A burst of raw file fetches tripping GitLab's rate limit mid-sync; shared quota exhausted by other clients using the same token or IP.
Common situations: Large repo syncs on GitLab.com free tiers; automated pipelines running collectors back-to-back.
Related errors
- [Gitea Loader]: Rate limit hit for ${endpoint}. Waiting ${re
- [Gitlab Loader]: Rate limit persists for ${sourceFilePath} a
- [Gitlab Loader]: Rate limit hit for ${endpoint}. Waiting ${r
- [Gitlab Loader]: Rate limit persists for ${endpoint} after $
- Rate limit exceeded
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/cb7a57c5afd7bc4b.
Report an issue: GitHub.