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
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.
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.