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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章