Vercel KV storage has not transitioned to Upstash

Hello, my Vercel KV storage has not transitioned to Upstash and my app is now broken.

I receive this error on the healthcheck api route in my nextjs app.

This Serverless Function has timed out.

Your connection is working correctly.

Vercel is working correctly.

504: GATEWAY_TIMEOUT
Code: FUNCTION_INVOCATION_TIMEOUT
ID: fra1::k8b9z-1738517855583-d88336b55874

Hi @ackvf, welcome to the Vercel Community!

Sorry that you’re facing this issue. Can you share here what are the error logs you see in the function execution?

We also have some troubleshooting docs which may be helpful:

@anshumanb There are no logs when i go to my project/logs.

The only thing i see is this

This is my handler

import { ping } from '@/services/redis'

/** Test the connection to the Redis database. */
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
  res.status(200).json({ redis: await ping() })
}

the redis.ts file

import { kv } from '@vercel/kv'

/** Test the connection to the Redis database. */
export async function ping(message?: string): Promise<string> {
  return kv.ping([message])
}

@pawlean
When I do this, it works just fine, so I am pretty sure it’s the redis.

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
  // res.status(200).json({ redis: await ping() })
  res.status(200).send('hi')
}

I can’t view the redis storage in my Vercel Dashboard.

Hi, @ackvf! Did you manage to get to the root issue of this?

No, I didn’t. I was still waiting for the migration to finalize, but nothing happened yet.

Hey @ackvf! Sorry for the late follow-up on this.

Vercel KV has been fully sunset, existing stores were automatically migrated to Upstash Redis back in December 2024. It sounds like the migration may not have completed properly for your store, which would explain the 504 timeouts.

Here’s what I’d suggest:

  • Head to the Vercel Marketplace and set up a fresh Upstash Redis store
  • Update your environment variables to point to the new store
  • You shouldn’t need any code changes — same Redis-compatible APIs

Updated docs here: Redis on Vercel

Let me know if you run into anything!