宕机 - redis单个节点被终止的原因有哪些?
PHP中文网
PHP中文网 2017-04-24 09:11:33
0
1
736

我在服务器上运行了一个redis实例,后来使用了一段时间发现redis连接不上去,6379端口也关闭了,看了log都是一连串的aof和rdb记录,最后一行也是说rdb成功退出。
请问各位redis前辈知道有哪些原因会导致redis端口被终止实例停止运行呢?之前搭建集群也有节点会莫名其妙宕掉,找Log也查不出名堂,跪求经验指点,谢谢!

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
大家讲道理

It seems that in version 2.8, redis will no longer support the vm-enabled option. I guess the reason is for performance reasons. As the amount of data increases, it will report that there is insufficient memory, cannot be written, or even the server is down

Pay special attention when you are implementing a persistence strategy.
For example, with 20G of memory, here comes the problem. When you insert data into redis, redis will asynchronously dump the data to the hard disk.
It sounds perfect when you think about it. The problem is that it will fork a process and occupy the same size of memory.
The memory you need is instantly 20G+20G =40G

I don’t know if your business volume is very large.

In addition, whether your business logic has memory leaks in the cache (resident cache).
It is recommended to write a script to monitor the server memory usage. Sometimes it is difficult to find the problem just by looking at the redis log.

I hope my suggestions can help you

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template