Mintplex-Labs/anything-llm · warning

[Gitlab Loader]: Rate limit hit for ${endpoint}. Waiting ${r

Error message

[Gitlab Loader]: Rate limit hit for ${endpoint}. Waiting ${retryAfter}s before retrying...

What it means

Transient warning from fetchNextPage: one paginated GitLab API call returned 429. The loader waits Retry-After seconds (or 60s default) and retries the same page with retries+1. It is normal back-off; only persistent throttling (see the 'persists' warning) loses data.

Source

Thrown at collector/utils/extensions/RepoLoader/GitlabRepo/RepoLoader/index.js:400

        per_page: perPage,
        page: requestData.page,
      });
      const url = `${this.apiBase}${endpoint}?${params.toString()}`;

      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 ${endpoint} after ${retries} retries. Skipping.`
          );
          return null;
        }
        const retryAfter = Number(response.headers.get("retry-after")) || 60;
        console.warn(
          `[Gitlab Loader]: Rate limit hit for ${endpoint}. Waiting ${retryAfter}s before retrying...`
        );
        await this.#wait(retryAfter * 1000);
        return this.fetchNextPage(requestData, retries + 1);
      }

      if (response.status === 401) {
        console.warn(
          `[Gitlab Loader]: Unauthorized request for ${endpoint}. Skipping.`
        );
        return null;
      }

      if (!response.ok) {
        console.warn(
          `[Gitlab Loader]: Unexpected status ${response.status} for ${endpoint}. Skipping.`
        );
        return null;

View on GitHub (pinned to 3aec848f28)

Solutions

  1. Let the built-in retry finish; no action for occasional lines.
  2. If frequent, slow the sync cadence or reduce page volume with filters.
  3. Verify the GitLab front-end (or proxy) sends Retry-After so waits are correctly sized.
Defensive patterns

Strategy: retry

Prevention

When it happens

Trigger: Rapid sequential page fetches exceeding GitLab's per-minute request quota; Retry-After header missing so the 60s default wait applies.

Common situations: Initial sync of large repos; quota shared with CI pipelines or other tools using the same PAT.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/d3f00fd5096343a7. Report an issue: GitHub.