Vercel serverless functions timing out with zero bytes returned after deployment

Problem

All serverless functions time out with zero bytes returned. Static assets work fine. Even a zero-dependency ping function hangs. The issue persists across two separate projects on the same account.

Current Behavior

  • Serverless functions hang until timeout.
  • Zero bytes are returned to the client.
  • Static assets are served correctly.
  • The issue occurs in production but works correctly in the local environment.

Context

All was working as expected on 3/28 when I last deployed under commit multiplier-dcau573xf-sbullocks-projects.vercel.app.

As of today, 3/29, I made some changes to my repository (rate limiting), committed and deployed to Vercel. I updated my env variables but keep getting hanging API calls. Both my /github and /claude calls are hanging until timeout.

Hi Sbullocks,

Since static assets work but every function hangs until timeout, I’d separate “Vercel can route to a function” from “your new runtime code is waiting forever.”

First, deploy one tiny endpoint that does not import anything shared from the app:

// app/api/ping/route.ts
export const dynamic = "force-dynamic"

export async function GET() {
  return Response.json({ ok: true, time: Date.now() })
}

If that works, the platform/function routing is fine and I’d look at the changes from the rate-limiting commit: middleware, shared auth helpers, Redis/KV/database clients, external fetches, or env vars that are now awaited before returning a response.

If that tiny endpoint also hangs, check whether it is really included in the latest deployment and inspect logs outside the dashboard:

vercel inspect <deployment-url> --logs
vercel logs <deployment-url> --since 1h

For the affected routes, I’d also add timing around each awaited operation:

console.time("rate-limit")
await checkRateLimit()
console.timeEnd("rate-limit")

console.time("upstream")
const res = await fetch(url, { signal: AbortSignal.timeout(10000) })
console.timeEnd("upstream")

A very common cause after adding rate limiting is a server-side call waiting on a missing/incorrect Production env var or an upstream service that is reachable locally but not from the deployed function. The key signal is whether the function logs stop before or after the rate-limit / external API call.

Vercel has a useful slow-function debugging command here:

Can you share the first log line before the hang and whether the isolated /api/ping route returns immediately?