slop audit
Blog post 75 / HTTP and launch readiness

HTTP 429 error: fix rate limits before website launch

Diagnose an HTTP 429 error, read Retry-After, reduce competing CI requests, and verify that public pages and required APIs recover before website launch.

By Slop Audit · 7 min read

HTTP 429 error means the client has exceeded a request limit. To fix it, identify the request and the rule that rejected it, wait for the permitted retry time, and reduce or correct the traffic responsible. For a website launch, check both the public HTML page and the API requests needed to complete its main task.

If you are visiting someone else's website, stop refreshing, follow any retry guidance, and contact support if the restriction persists. The steps below are for developers and students who control the website or its deployment checks.

Diagnose an HTTP 429 error from one failed request

Start in the browser Network panel. Record the failing URL, method, status, UTC time, and any request ID. Inspect the response body and headers before restarting the application or changing a limit.

Separate three cases:

  • The document returns 429. The visitor cannot load the intended public page. Investigate the rule applied to that route and client.
  • The document returns 200, but a required API returns 429. The shell works while search, signup, or another task fails. Inspect that API's quota and the application's error state.
  • An optional integration returns 429. Identify the integration and confirm that the core page still works. Avoid treating an analytics failure as proof that your own server rejected the visitor.

RFC 6585 defines 429 as excessive requests within a period. It leaves the counting method and client identity to the server: a limit could be associated with credentials, a resource, or another grouping. A status code alone cannot tell you which quota was exceeded. RFC 6585, section 4

Use a single GET request to save evidence from a route you own. Replace the example address:

curl --silent --show-error --max-time 20 \
  --dump-header /tmp/launch-response.headers \
  --output /tmp/launch-response.body \
  --write-out 'HTTP %{http_code}\n' \
  https://example.com/docs

This command deliberately saves error responses instead of retrying them. Review the files locally; redact tokens, cookies, and personal data before sharing evidence. If the failing request redirects, inspect the destination separately and preserve both responses.

Find which layer owns the rate limit

Correlate the timestamp and request ID with the edge, gateway, application, and vendor logs available to your team. An edge can enforce a limit before a request reaches application code; an application can also relay a vendor's rejection. Branding and a Server header are clues, while a matching log event can identify the rule.

For Cloudflare, its 429 troubleshooting documentation identifies rate limiting as a source of 429 responses. Check the configuration and events for the product you actually use. A Cloudflare API quota and a rate-limit rule protecting your website are separate investigations.

Write down the rule's scope, counting window, threshold, and reset behavior. Then compare those settings with a normal visitor session and the deployment workload. Useful questions include:

  • Does one shared CI runner address represent several concurrent jobs?
  • Do page checks, link checks, and browser tests hit the same origin simultaneously?
  • Does one user action trigger duplicate requests or polling that continues after leaving the page?
  • Do independent workers use the same vendor API key and quota?
  • Does a public read-only page accidentally share a bucket with an expensive write endpoint?

For example, six deployment jobs can each behave reasonably in isolation while collectively exceeding a bucket keyed by source address. Record the actual request pattern before deciding that the threshold is too low. Changing an unrelated application limit will not repair an edge rejection.

Read the Retry-After header correctly

A 429 response may include Retry-After. Its absence does not change the status or establish that an immediate retry is safe. A simple JSON response contract might look like this:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 60
Cache-Control: no-store

{"error":"rate_limited","message":"Please wait before trying again."}

Here, 60 means a delay of 60 seconds, not milliseconds or a timestamp. Retry-After can alternatively contain an HTTP date. Follow the server's value when scheduling another attempt, and account for clock differences when interpreting dates. The header provides retry guidance; it does not guarantee that a later request will succeed. MDN Retry-After reference

Use the response contract for the endpoint's actual audience. A public document needs understandable HTML and a useful next step; an API consumer needs a predictable error format. Keep internal rule identifiers and infrastructure details out of the user-facing message.

A browser application should preserve entered values, explain that the action was limited, and offer another attempt when appropriate. Confirm that it checks the HTTP status before displaying success. Use the JavaScript console and network troubleshooting guide to separate HTTP error responses from connection failures.

Fix request coordination before increasing limits

For deployment checks, assign one job to run the public audit after the preview is ready. Serialize checks that share a tight quota, reduce unnecessary route probes, and cancel obsolete runs after a newer commit supersedes them. Keep the audit result attached to the commit it actually tested. The website audit with GitHub Actions guide covers deployment targeting and evidence in PRs.

For application traffic, remove duplicate listeners, deduplicate concurrent reads where suitable, and stop obsolete polling. Where the service permits automatic retries, use a small attempt budget and increasing delays with jitter when no valid server delay is available. If the server asks you to wait longer than the job's remaining budget, stop and report the limit rather than retrying earlier.

Review writes separately. A rejected or ambiguous payment, signup, or message request should not be replayed blindly. Follow the endpoint's documented retry and idempotency contract so a recovery attempt cannot accidentally duplicate an action.

Adjust a rate-limit rule only after confirming that legitimate traffic needs the change. Scope the correction to the route and workload involved, retain abuse protection, and measure the result. A temporary service-wide outage belongs in the HTTP 503 troubleshooting workflow; changing every 429 to 503 hides the distinction you need to investigate.

Add an HTTP 429 error recovery check to CI

A recovery check should fail visibly when a required route is still limited. The following Node.js 22 script sends one request at a time to a public HTML page and a public JSON endpoint. Replace the routes, expected heading, and API field with your application's contract. It performs no automatic retries.

// scripts/check-public-recovery.mjs
import assert from "node:assert/strict";

const origin = process.env.RELEASE_ORIGIN;
if (!origin) throw new Error("Set RELEASE_ORIGIN to the deployment under test");

const checks = [
  { path: "/docs", type: "text/html", text: "<h1>Documentation</h1>" },
  { path: "/api/public/config", type: "application/json" },
];

for (const check of checks) {
  const url = new URL(check.path, origin);
  const response = await fetch(url, {
    redirect: "error",
    signal: AbortSignal.timeout(10_000),
  });
  const retryAfter = response.headers.get("retry-after") ?? "not supplied";
  assert.equal(response.status, 200,
    `${check.path}: HTTP ${response.status}; Retry-After=${retryAfter}`);
  assert.ok(response.headers.get("content-type")?.includes(check.type),
    `${check.path}: unexpected content type`);

  if (check.text) {
    assert.ok((await response.text()).includes(check.text),
      `${check.path}: expected page content is missing`);
  } else {
    const config = await response.json();
    assert.equal(config.serviceName, "Project Atlas");
  }
}
console.log("Public route recovery checks passed");

Run it once after the limit's retry window and after repairing the identified cause:

RELEASE_ORIGIN=https://example.com node scripts/check-public-recovery.mjs

The exact HTML string is a deliberately small contract for this example. Adapt it to stable content in your server response; use a browser assertion for content your application renders only after JavaScript runs. These two sequential requests verify recovery for their client at that time. They do not measure capacity or prove that other clients' quota buckets have recovered.

Separately, test the frontend's limited state with a mocked 429 response: check the visible message, preserved input, retry control, and absence of a false success message. Playwright's API mocking documentation shows how to intercept a request without exhausting a real quota. Then complete the main task against the real service once it is available, and keep the outcome in your website regression testing record.

Audit the recovered public URL with Slop Audit

After the original request and visitor task recover, run Slop Audit on the public release URL. Its static audit records the final document's HTTP status and content type and flags an unsuccessful response. Once usable HTML is available, review the available metadata, crawl-control, and browser evidence, then rescan after fixes.

Slop Audit does not inspect your rate-limit configuration, validate Retry-After, simulate every quota bucket, or load-test the site. Check the report's coverage ledger before interpreting downstream findings from a blocked page. Use the report alongside your request logs and focused recovery test to decide whether the release is ready.