frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

max limit reached with redis [10:45am] #51

Closed frankcollins3 closed 11 months ago

frankcollins3 commented 11 months ago

attempting to do: use redis for caching.

error: solved a max instance issue with prisma and graphQL queries. and now have a max retry issue with redis Screen Shot 2023-07-16 at 10 56 03 AM

proposed approach: config? just imported redis who knows

// bookmarking agreement to a finance person saying chatGPT can be delusional. Just had issue with connection pool limits where chatGPT refuted my correct answer, and steered us towards: 👎 extending a type declaration as an interface to assert onto the prisma datasources object ... the answer was to 👍 add string param: ${psql-string}/waterappDB?connection_limit=50

here we go again with redis: 👎 let redis = new Redis("127.0.0.1:6379"); // Example Redis endpoint const redisData = await redis.incr("counter"); redis.quit() chatGPT throws us into the deep end.

during a problem where the solution can more easily be: const redisClient = new Redis(); 👍 A parameterless, configureless method invocation

frankcollins3 commented 11 months ago

Server Error Error: Error serializing .redisClient returned from getServerSideProps in "/logInOutGoogle". Reason: object ("[object Object]") cannot be serialized as JSON. Please only return JSON serializable data types.

This error happened while generating the page. Any console logs will be displayed in the terminal window. Call Stack isSerializable

time for: util func by which we may stringify object data.

[11:03am]

frankcollins3 commented 11 months ago

👍 serialize as normal in the serversideProps function