前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Codis 基础17

Codis 基础17

作者头像
franket
发布2022-03-25 10:10:07
3030
发布2022-03-25 10:10:07
举报
文章被收录于专栏:技术杂记

修改此值

代码语言:javascript
复制
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6379 CONFIG set maxmemory 100
OK
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6389 CONFIG set maxmemory 100
OK
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6390 CONFIG set maxmemory 100
OK
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6380 CONFIG set maxmemory 100
OK
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6379 CONFIG GET maxmemory
1) "maxmemory"
2) "100"
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6380 CONFIG GET maxmemory
1) "maxmemory"
2) "100"
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6389 CONFIG GET maxmemory
1) "maxmemory"
2) "100"
[root@h102 codis]# extern/redis-2.8.21/src/redis-cli -p 6390 CONFIG GET maxmemory
1) "maxmemory"
2) "100"
[root@h102 codis]#

进行自动均衡

代码语言:javascript
复制
[root@h102 codis]# bin/codis-config slot rebalance 
{
  "msg": "OK",
  "ret": 0
}
[root@h102 codis]# 
codis_autorebalance.png
codis_autorebalance.png

codis dashboard重启问题

codis dashboard由于各种原因可能要重启

比如重读配置文件(将zk端口从2180改为2181),此时dashboard会报错

代码语言:javascript
复制
2015/12/04 22:38:08 Failed to connect to 192.168.100.101:2180: dial tcp 192.168.100.101:2180: i/o timeout
2015/12/04 22:38:09 Failed to connect to 192.168.100.101:2180: dial tcp 192.168.100.101:2180: i/o timeout
2015/12/04 22:38:09 Failed to connect to 192.168.100.101:2180: dial tcp 192.168.100.101:2180: i/o timeout
2015/12/04 22:38:09 Failed to connect to 192.168.100.101:2180: dial tcp 192.168.100.101:2180: i/o timeout
2015/12/04 22:38:09 Failed to connect to 192.168.100.101:2180: dial tcp 192.168.100.101:2180: i/o timeout

另开一个窗口,手动将dashboard进程杀死

代码语言:javascript
复制
[root@h102 codis]# kill  36106 
[root@h102 codis]# ps faux | grep conf
root      1799  0.0  0.1 189408  3784 ?        Ss   09:44   0:00 cupsd -C /etc/cups/cupsd.conf
root     36106  2.8  4.8 310552 93192 pts/0    Sl+  21:17   2:16  |       \_ bin/codis-config dashboard
root     36715  0.5  1.1 320592 22764 pts/1    Sl+  22:37   0:00  |       \_ bin/codis-proxy -c config.ini -L /tmp/proxy.log --cpu=2 --addr=0.0.0.0:19000 --http-addr=0.0.0.0:11000
root     36728  0.0  0.0 103256   828 pts/2    S+   22:37   0:00          \_ grep conf
[root@h102 codis]# kill -9 36106
[root@h102 codis]# ps faux | grep conf
root      1799  0.0  0.1 189408  3784 ?        Ss   09:44   0:00 cupsd -C /etc/cups/cupsd.conf
root     36715  0.4  1.1 320592 22772 pts/1    Sl+  22:37   0:00  |       \_ bin/codis-proxy -c config.ini -L /tmp/proxy.log --cpu=2 --addr=0.0.0.0:19000 --http-addr=0.0.0.0:11000
root     36730  0.0  0.0 103256   828 pts/2    S+   22:38   0:00          \_ grep conf
[root@h102 codis]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • codis dashboard重启问题
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档