Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hasura ddn caching with Redis : ENOTFOUND, ECONNREFUSED. #10657

Open
priyam86f opened this issue Jan 23, 2025 · 4 comments
Open

Hasura ddn caching with Redis : ENOTFOUND, ECONNREFUSED. #10657

priyam86f opened this issue Jan 23, 2025 · 4 comments
Labels
k/v3-bug Bug affecting Hasura v3 (DDN)

Comments

@priyam86f
Copy link

I am trying to integrate redis caching in hasura ddn and getting these two errors of ENOTFOUND and ECONNREFUSED.
Sharing the stepwise approach I followed, also attatching my system screenshots.

1)Set up the entire ddn using these commands here as usual : https://hasura.io/docs/3.0/quickstart

2)So far, I have everything working fine. Note - I have a big database with a lot of schema's and I just wanted 3 tables from a particular schema and that is how my queries and mutations got designed, no issues so far.

3)Once the ddn setup was successful I then proceeded to implement redis caching, not knowing this would be a nightmare.

4)I first pulled the redis docker image by : docker pull redis

5)Now, the redis container was inside the main mysupergraph container (Screenshot attatched)

6)I tested if both redis container and caching container could communicate and it was a success.

7)Followed each step from this document : https://hasura.io/docs/3.0/plugins/caching/how-to/

8)The first step is to write a compose.yaml file, and I did it, screenshot attatched.

9)Next step was to write a caching-config.js (Screenshot attatched)

10)Next step was to apply lifecycle plugins (Screenshot attatched)

11)set up the env variables as asked in .env - Screenshot attatched.

12)Finally, as everything asked in the document was done I proceeded with these commands : $ ddn supergraph build local
$ ddn run docker-start

13)My application started, now when I hit this - docker compose logs -f caching, I get a "ECONNREFUSED" and a "ENOTFOUND" issue (screenshot attached), and a sweet cherry on the cake - caching not happening. Built this same application 3 times and everytime the issue persists. Attatching docker screenshots as well.

These are all the details from my end. Please, please help me resolve these at earliest.

Image
Image
Image
Image
Image
Image
Image
Image

@priyam86f priyam86f added the k/v3-bug Bug affecting Hasura v3 (DDN) label Jan 23, 2025
@priyam86f
Copy link
Author

@seanparkross
Copy link
Contributor

Hey @priyam86f I have escalated this with the respective team.

@priyam86f
Copy link
Author

@seanparkross @typhonius @TristenHarr @codedmart

some more insights , Series of events I performed :
1.Initially the container name was mysupergraph-redis-1 and caching container was looking for the container with name ‘redis’, somehow in this name there is an IP address attached.
2.I am assuming that IP address is attached to the container name because now when I changed the container name to "rediss" adding an extra 's', and, the ECONNREFUSED error vanishes, that means that the caching container is now successfully connecting to the redis container.
3.Now a new error appears with the name ENOTFOUND saying it is looking for a container with the name redis but it cannot find one.
4.So if we name the container as ‘redis’ we do again get ECONNREFUSED,this is a never ending loop.

@priyam86f
Copy link
Author

"found cacheable query with no current entry". @codedmart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/v3-bug Bug affecting Hasura v3 (DDN)
Projects
None yet
Development

No branches or pull requests

2 participants