一、问题:修改docker 安装的redis redis maxclients报错:
(error) ERR CONFIG SET failed (possibly related to argument ‘maxclients’) - The operating system is not able to handle the specified number of clients, try with 65504
二、排查过程:
1、查看redis.log: docker logs --tail 200 redis |grep clients
1:M 29 Oct 2024 14:01:38.652 # You requested maxclients of 100000 requiring at least 100032 max file descriptors.
1:M 29 Oct 2024 14:01:38.652 # Current maximum open files is 65536. maxclients has been reduced to 65504 to compensate for low ulimit. If you need higher maxclients increase ‘ulimit -n’.
1:M 29 Oct 2024 14:01:38.652 # Failed applying new configuration. Possibly related to new maxclients setting. Restoring previous settings.
三、解决过程
1、安装redis.log提示修改ulimit -n 调大未解决,
2、根据提示说的是maximum open files is 65536 ,查看最大文件描述符cat /pro//limits
ps axu |grep redis 获取到pid 为 222846

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



