`
hai0378
  • 浏览: 517855 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

redis 连接数 修改

 
阅读更多

1、其实你是受到了redis的file descriptor数目限制,这个需要更改redis的源码,在ae.h的36行(2.2.4版本):

  1. #define AE_SETSIZE (1024*10)    /* Max number of fd supported */
 

2、另外需要注意的是,如果你需要支持更高的连接数,还需要更改系统的相关配置,比如ulimit数目:

  1. ulimit -n xxx(你需要的数目)
 

以及网络的并发连接数等限制:

  1. net.ipv4.netfilter.ip_conntrack_max
  2. net.nf_conntrack_max
  3. net.netfilter.nf_conntrack_max
 
评论 (1) • 链接 • 2012-03-08
  • 0
    果然可以了,谢谢! – Eclipse 2012-03-08
 

redis.conf中maxclients 设置为0表示不作限制。

评论 (1) • 链接 • 2012-03-06
  • 0
    这个值就是设置的0 – Eclipse 2012-03-06
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics