By nginx forwards with external network connections Ali cloud redis, reported Unexpected end of stream solution
A, with the following settings made redis nginx on a same intranet server A
stream {
upstream redis {
server redis.rds.aliyuncs.com:6379 max_fails=3 fail_timeout=30s;
}
server {
listen 6379;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass redis;
}
}
Second, the server A by B: 6379 to connect to the cloud Ali redis
Three, redis often error Unexpected end of stream
Fourth, the solution nginx modify the following two parameters:
server {
listen 6379;
proxy_connect_timeout 10s;
proxy_timeout 30s;
proxy_pass redis;
}
}
A, with the following settings made redis nginx on a same intranet server A
stream {
upstream redis {
server redis.rds.aliyuncs.com:6379 max_fails=3 fail_timeout=30s;
}
server {
listen 6379;
proxy_connect_timeout 1s;
proxy_timeout 3s;
proxy_pass redis;
}
}
Second, the server A by B: 6379 to connect to the cloud Ali redis
Three, redis often error Unexpected end of stream
Fourth, the solution nginx modify the following two parameters:
server {
listen 6379;
proxy_connect_timeout 10s;
proxy_timeout 30s;
proxy_pass redis;
}
}