The cluster configuration is as follows
The docker compose configuration is as follows
version: "3.2"
services:
zero:
image: dgraph/dgraph:v21.12-slash
volumes:
- /tmp/data:/dgraph
ports:
- 5080:5080
- 6080:6080
restart: on-failure
command: dgraph zero --my=ip3:5080 --replicas 3 --peer ip1:5080 --raft="idx=3"
networks:
- net-test
alpha:
image: dgraph/dgraph:v21.12-slash
volumes:
- /tmp/data/d0:/dgraph
ports:
- 7080:7080
- 8080:8080
- 9080:9080
deploy:
replicas: 1
restart: on-failure
command: dgraph alpha --my=ip3:7080 --zero=ip1:5080,ip2:5080,ip3:5080 --security whitelist=0.0.0.0/0
networks:
- net-test
alpha1:
image: dgraph/dgraph:v21.12-slash
volumes:
- /tmp/data/d1:/dgraph
ports:
- 7081:7081
- 8081:8081
- 9081:9081
restart: on-failure
command: dgraph alpha --my=ip3:7081 --zero=ip1:5080,ip2:5080,ip3:5080 --security whitelist=0.0.0.0/0 -o 1
networks:
- net-test
networks:
net-test:
ipam:
config:
- subnet: ip.0/24
Problem Description
At the beginning of the cluster, everything was normal. After running for a period of time, the ip3:7080 alpha in Group1 cannot perform query query. The query statement is as follows
{
query(func: type(user)) @filter(eq(name, "test")) {
uid
expand(_all_) {
uid
expand(_all_)
}
}
}
Request URL:http://ip3:8080/query?timeout=20s&debug=true
Response
{
"errors": [
{
"message": ": context deadline exceeded",
"extensions": {
"code": "ErrorInvalidRequest"
}
}
],
"data": null
}
I don’t understand why this is happening, please help me with this