Closed frankcollins3 closed 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]
👍 serialize as normal in the serversideProps function
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](https://github.com/frankcollins3/Next-Water-App/assets/73137934/869653ab-98ec-4050-bb83-28be3518dc95)
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