构建的codis群集,dashboard.log报错i/o timeout

构建的codis群集,dashboard.log报错

环境说明:
codis2.0群集
同时开启rdb和aof

save 900 1
save 300 10
save 60 10000

appendfsync everysec

报错1:

2016/01/12 12:11:14 dashboard_apis.go:74: [ERROR] get redis stat failed
[error]: dial tcp 172.16.18.163:6385: connection refused
    3   /usr/local/codis/src/github.com/wandoulabs/codis/pkg/utils/redis.go:19
            github.com/wandoulabs/codis/pkg/utils.DialToTimeout
    2   /usr/local/codis/src/github.com/wandoulabs/codis/pkg/utils/redis.go:31
            github.com/wandoulabs/codis/pkg/utils.DialTo
    1   /usr/local/codis/src/github.com/wandoulabs/codis/pkg/utils/redis.go:89
            github.com/wandoulabs/codis/pkg/utils.GetRedisStat
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:72
            main.apiOverview
        ... ...
[stack]:
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:74
            main.apiOverview
        ... ...
2016/01/12 12:11:19 dashboard_apis.go:74: [ERROR] get redis stat failed
[error]: read tcp 172.16.18.121:6383: i/o timeout
    1   /usr/local/codis/src/github.com/wandoulabs/codis/pkg/utils/redis.go:97
            github.com/wandoulabs/codis/pkg/utils.GetRedisStat
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:72
            main.apiOverview
        ... ...
[stack]:
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:74
            main.apiOverview
        ... ...
2016/01/12 12:11:19 dashboard_apis.go:74: [ERROR] get redis stat failed
[error]: read tcp 172.16.18.121:6383: i/o timeout
    1   /usr/local/codis/src/github.com/wandoulabs/codis/pkg/utils/redis.go:97
            github.com/wandoulabs/codis/pkg/utils.GetRedisStat
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:72
            main.apiOverview
        ... ...
[stack]:


分析:
这个问题可以能硬盘的写入有异常,业务数据量很大,redis同时进行rdb和aof持久化操作,导致io读写瓶颈,
appendfsync everysec可以设置为appendfsync no 跟linux系统时间,30秒持久化一次。但也会偶尔出现io的报错。
如果数据安全性不是很高的话,建议可以关闭aof保留rdb即可。



报错2:

2016/01/12 14:25:02 dashboard_apis.go:74: [ERROR] get redis stat failed
[error]: LOADING Redis is loading the dataset in memory
    1   /usr/local/codis/src/github.com/wandoulabs/codis/pkg/utils/redis.go:111
            github.com/wandoulabs/codis/pkg/utils.GetRedisStat
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:72
            main.apiOverview
        ... ...
[stack]:
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:74
            main.apiOverview
        ... ...
2016/01/12 14:25:02 dashboard_apis.go:74: [ERROR] get redis stat failed
[error]: LOADING Redis is loading the dataset in memory
    1   /usr/local/codis/src/github.com/wandoulabs/codis/pkg/utils/redis.go:111
            github.com/wandoulabs/codis/pkg/utils.GetRedisStat
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:72
            main.apiOverview
        ... ...
[stack]:
    0   /usr/local/codis/src/github.com/wandoulabs/codis/cmd/cconfig/dashboard_apis.go:74
            main.apiOverview
        ... ...

分析:
reids刚刚启动会报错,等redis内存数据加载完成后就正常了。

参考:
http://blog.csdn.net/wkupaochuan/article/details/8776175
http://my.oschina.net/wfire/blog/301147

你可能感兴趣的:(Redis)