以下内容就当我放了个P,搞错地方了,本应查的地方是redis为什么会在早上6点35的时候收到停止信号,然后在一分多钟后又自动重启,这个原因至今没定位原因,下面说的报错是redis启动报错,这个跑题了
Redis报错
参考:https://coderwall.com/p/j5osrg/when-redis-can-t-set-maximum-open-files
日志报错内容如下:
20256:M 13 Dec 06:37:17.415 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
20256:M 13 Dec 06:37:17.416 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
20256:M 13 Dec 06:37:17.416 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
解决办法:
root@xsjSG-test1:~# vim /etc/default/redis-server
取消注释ULIMIT=65536
重启redis