hasura / hasura/graphql-engine

Hasura ddn caching with Redis : ENOTFOUND, ECONNREFUSED.

Open
#10,657 4 comments 0 reactions 0 assignees View on GitHub
k/v3-bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

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](https://github.com/user-attachments/assets/f6273117-31c7-4af6-87fa-e2ec7425dbe4)
![Image](https://github.com/user-attachments/assets/744a410a-0f4c-45f8-88fd-845adf53e60c)
![Image](https://github.com/user-attachments/assets/c3ad2482-6211-4931-aec8-090489b0229c)
![Image](https://github.com/user-attachments/assets/c2cf8ec7-82f0-46c3-a5ff-e23416306057)
![Image](https://github.com/user-attachments/assets/c92d13a3-3c81-4da1-9d1c-04b06e2cf418)
![Image](https://github.com/user-attachments/assets/09699069-f18f-4ef9-bca8-6344b70a2d4e)
![Image](https://github.com/user-attachments/assets/6f0bd74a-80e2-4239-8680-40a5be31c63e)
![Image](https://github.com/user-attachments/assets/dba40a2a-81b1-4872-9f30-6bae60747684)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked caching how-to alongside compose.yaml, caching-config.js, and .env, then reproduce the issue with ddn supergraph build local and ddn run docker-start. Inspect docker compose logs -f caching and the attached configuration and screenshots; done means the caching service starts without ENOTFOUND or ECONNREFUSED and caching works for the application.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, graphql, javascript, redis
Domain
backend-api-design, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.