Mac进入redis服务端错误信息:"Increased maximum number of open files to 10032 (it was originally set to 256)"

1.Redis服务端正在加载数据时,由于退出redis服务端或者关闭redis服务端窗口....,导致无法再次进入redis服务端,如下错误:

>>>$ redis-server  # 启动redis服务端
1051:C 06 May 2019 14:13:49.227 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1051:C 06 May 2019 14:13:49.227 # Redis version=5.0.4, bits=64, commit=00000000, modified=0, pid=1051, just started
1051:C 06 May 2019 14:13:49.227 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1051:M 06 May 2019 14:13:49.228 * Increased maximum number of open files to 10032 (it was originally set to 256).
1051:M 06 May 2019 14:13:49.228 # Could not create server TCP listening socket *:6379: bind: Address already in use

(1)解决错误信息:

# 查看系统限制  
>>>$ ulimit -a  


# 设置“open files”数量  
>>>$ ulimit -n 10032  

2.再次进入redis服务端,如下错误:

>>>$ redis-server
1061:C 06 May 2019 14:14:36.611 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1061:C 06 May 2019 14:14:36.611 # Redis version=5.0.4, bits=64, commit=00000000, modified=0, pid=1061, just started
1061:C 06 May 2019 14:14:36.611 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1061:M 06 May 2019 14:14:36.613 # Could not create server TCP listening socket *:6379: bind: Address already in use
6379地址已经在使用(6379是redis默认的端口)

(2)解决错误信息:

>>>$ ps -ef | grep -i redis

进程号3272是redis的服务器

2.2、杀死该进程

使用"kill -9"命令
kill -9 3272  # 进程3272是redis服务器

2.3、重新启动redis服务器


>>>$ redis-server
5377:C 05 May 2019 21:20:46.788 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5377:C 05 May 2019 21:20:46.788 # Redis version=5.0.4, bits=64, commit=00000000, modified=0, pid=5377, just started
5377:C 05 May 2019 21:20:46.788 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 5.0.4 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 5377
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

5377:M 05 May 2019 21:20:46.791 # Server initialized
5377:M 05 May 2019 21:20:46.791 * Ready to accept connections

 

  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值