next-shared-cache icon indicating copy to clipboard operation
next-shared-cache copied to clipboard

When I'm running well locally, deploying to "vercel" doesn't work, redis connection timeout

Open a20000110 opened this issue 11 months ago • 5 comments

微信截图_20240319172413 I am using yarn build yarn start locally and everything is running well

When I deploy to vercel, it doesn't work. 微信截图_20240319172639

Redis does not work in cache handler. js, I initially thought it was a Redis issue, so I created an/app/test. ts; I tried to connect to Redis and retrieve the value from it, and was able to access and read the value from Redis normally. However, in the Vercel environment, it did not work in cache handler. js and reported an error: connection timeout. Please help me! @better-salmon

a20000110 avatar Mar 19 '24 09:03 a20000110

I use pages router

a20000110 avatar Mar 19 '24 09:03 a20000110

@a20000110 hello! This library was made for self-hosted environments with multiple instances of the app. I'm afraid, it doesn't work in Vercel's deployments

better-salmon avatar Mar 19 '24 11:03 better-salmon

@a20000110 hello! This library was made for self-hosted environments with multiple instances of the app. I'm afraid, it doesn't work in Vercel's deployments

Thank you for your reply, but I can use the "App router" mode but it works fine. https://redis-puce.vercel.app/

I found that using app router would store data in redis at build time, which pages router couldn't do. Is that what this is about?

a20000110 avatar Mar 19 '24 12:03 a20000110

i have same problem, not sure why :/

IRediTOTO avatar Aug 27 '24 11:08 IRediTOTO

@IRediTOTO hello! Can you please share your CacheHandler configuration?

better-salmon avatar Sep 05 '24 21:09 better-salmon