为什么redis不能设置最大打开文件 [英] Why redis can not set maximum open file

查看:72
本文介绍了为什么redis不能设置最大打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<前>1167:M 26 Apr 13:00:34.666 # 您请求的 maxclients 为 10000,需要至少 10032 个最大文件描述符.1167:M 26 Apr 13:00:34.667 # 由于操作系统错误,Redis 无法将最大打开文件数设置为 10032:不允许操作.1167:M 26 Apr 13:00:34.667 # 当前最大打开文件数为 4096.maxclients 已减少到 4064 以补偿低 ulimit.如果您需要更高的 maxclients,请增加 'ulimit -n'.1167:M 26 Apr 13:00:34.685 # 创建服务器 TCP 侦听套接字 192.34.62.56 :6379:名称或服务未知1135:M 26 Apr 20:34:24.308 # 您请求的 maxclients 为 10000,需要至少 10032 个最大文件描述符.1135:M 26 Apr 20:34:24.309 # 由于操作系统错误,Redis 无法将最大打开文件数设置为 10032:不允许操作.1135:M 26 Apr 20:34:24.309 # 当前最大打开文件数为 4096.maxclients 已减少到 4064 以补偿低 ulimit.如果您需要更高的 maxclients,请增加 'ulimit -n'.1135:M 26 Apr 20:34:24.330 # 创建服务器 TCP 侦听套接字 192.34.62.56 :6379:名称或服务未知

解决方案

Redis 永远不会改变最大打开文件数.

这是一个操作系统配置,也可以按用户进行配置.该错误是描述性的,并告诉您:增加 'ulimit -n'"

您可以参考这篇博文了解如何增加最大打开文件描述符:http://www.cyberciti.biz/常见问题解答/linux-increase-the-maximum-number-of-open-files/

1167:M 26 Apr 13:00:34.666 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
1167:M 26 Apr 13:00:34.667 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
1167:M 26 Apr 13:00:34.667 # 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'.
1167:M 26 Apr 13:00:34.685 # Creating Server TCP listening socket 192.34.62.56​​:6379: Name or service not known
1135:M 26 Apr 20:34:24.308 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
1135:M 26 Apr 20:34:24.309 # Redis can't set maximum open files to 10032 because of OS error: Operation not permitted.
1135:M 26 Apr 20:34:24.309 # 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'.
1135:M 26 Apr 20:34:24.330 # Creating Server TCP listening socket 192.34.62.56​​:6379: Name or service not known

解决方案

Redis will never change the maximum open files.

This is a OS configuration and it can be configured on a per user basis also. The error is descriptive and tells you: "increase 'ulimit -n'"

You can refer to this blog post on how to increase the maximum open files descriptors: http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

这篇关于为什么redis不能设置最大打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆