Vercel INFINITE_LOOP_DETECTED

Vercel returns INFINITE_LOOP_DETECTED and Loop Detected? The app is requesting itself without stopping, or doing the same to an external API or database.

Reviewed October 22, 2026

What it means in plain English

Vercel documents INFINITE_LOOP_DETECTED as an infinite loop inside the application. It says this can happen when the application makes an infinite number of requests to itself, or an infinite number of requests to an external API or database. The response it shows is Loop Detected.

An unhandled exception in Routing Middleware is a different code. See MIDDLEWARE_INVOCATION_FAILED.

Likely causes

  • A fetch calls the same deployment again, and that path calls it back.
  • A redirect has no condition, so the request never leaves the loop.
  • next.config.js or vercel.json sends the request back into the same path.
  • An external API or database call is itself looping, or an unhandled exception keeps the loop going.

How to fix it, step by step

  1. Read the source for a loop, such as a looping fetch or an unconditional redirect.
  2. Review next.config.js and vercel.json. Vercel says to check that those files are not causing the loop.
  3. Check external API and database calls for errors or infinite loops.
  4. Open the application logs and look for an unhandled exception that might be causing the loop.
  5. If those steps are done and the error continues, check Vercel's status page for a CDN outage. Vercel says a CDN outage can sometimes cause this error.

How to check it worked

  • The route that returned Loop Detected now returns the page or the API response.
  • The logs no longer show INFINITE_LOOP_DETECTED for that request.

Sources

More Vercel deploy and runtime fixes

Keep going on your own.

The guides stay free. A deep leak report is $15. Fix packs are $24, or $49 for all three. There is no done-for-you repair.

See products